Menu

Should CBitmapButtonImpl::OnKeyUp fire WM_COMMAND?

2014-04-22
2014-05-05
  • Nikolay Mladenov

    Also, is it possible to add CheckBox behavior to CBitmapButtonImpl?

     
  • Nikolay Mladenov

    My bad, OnKeyUp does fire WM_COMMAND through the default message processing...

    as for the CheckBox behavior - can I provide a patch for consideration?

     
  • Nikolay Mladenov

    I have not yet tested the new AUTOCHECK style, but I noticed that you reverted the dblclick processing of the AUTOCHECK buttons to the default. Although the Check Box button has different dblclick handling than the ownerdraw button?

     
  • Nikolay Mladenov

    The problem the current implementation has, was one that I had to solve when I was preparing the patch, and it is the following:

    Double clicking the AUTOCHECK bitmap button changes its state twice but only fires one BN_CLICKED in-between the two state changes. So the second state change may go unnoticed.

    The standard Check box on the other hand fires two BN_CLICKED after each state change.

     

    Last edit: Nikolay Mladenov 2014-05-04
    • Nenad Stefanovic

      OK, if that is the problem, than we would need to go all the way to emulate
      check box behavior and use separate style for manual check. Otherwise we
      would have a discrepancy between manual and auto check modes.

      If nothing changes then we need to handle both single-click and
      double-click to track the state.

      Which case do you like better and why?

      Cheers,
      Nenad

      On Sun, May 4, 2014 at 7:22 AM, Nikolay Mladenov nikiml@users.sf.netwrote:

      The problem the current implementation has was one that I had to solve
      when I was preparing the patch, and it is the following:

      Double clicking the AUTOCHECK bitmap button changes its state twice but
      only fires one BN_CLICKED in between the two state changes. So the second
      state change may go unnoticed.

      The standard Check box on the other hand fires two BN_CLICKED after each
      state change.


      Should CBitmapButtonImpl::OnKeyUp fire WM_COMMAND?https://sourceforge.net/p/wtl/discussion/374433/thread/21f0a010/?limit=25#680b

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/wtl/discussion/374433/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Nikolay Mladenov

    I was aiming for a drop-in auto-checkbox replacement, which does not need handling double clicks to track the state.

    As for the manual check box - does it need more than just not setting the m_fChecked?
    ( I am not too intimate with win32, sorry)

     
    • Nenad Stefanovic

      We would need another style for manual check to suppress double click there
      as well. Otherwise we would have double click for manual check (which check
      box doesn't have), and wouldn't have to for auto check. Other than that,
      the style is not needed.

      Cheers,
      Nenad

      On Sun, May 4, 2014 at 8:41 PM, Nikolay Mladenov nikiml@users.sf.netwrote:

      I was aiming for a drop-in auto-checkbox replacement, which does not need
      handling double clicks to track the state.

      As for the manual check box - does it need more than just not setting the
      m_fChecked?
      ( I am not too intimate with win32, sorry)


      Should CBitmapButtonImpl::OnKeyUp fire WM_COMMAND?https://sourceforge.net/p/wtl/discussion/374433/thread/21f0a010/?limit=25#319d

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/wtl/discussion/374433/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Nikolay Mladenov

    I still do not follow.

    But I would not mind if you add BMPBTN_CHECK.

     

Log in to post a comment.