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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, which one is right? I think it doesn't matter - if you don't handle
double clicks, it is the same. So, it seems just a bit more flexible this
way.
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?
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.
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.
There is no difference for Button with BS_CHECKBOX or BS_AUTOCHECKBOX, but
there would be a difference with CBitmapButton of we don't add BMPBTN_CHECK.
Also, is it possible to add CheckBox behavior to CBitmapButtonImpl?
My bad, OnKeyUp does fire WM_COMMAND through the default message processing...
as for the CheckBox behavior - can I provide a patch for consideration?
Hi Nikolay,
Yes, WM_COMMAND is OK.
CheckBox: Sure, please provide a patch, we'll consider it fo sure. It is
unlikely to go in WTL9 release, but it would go in after that.
Cheers,
Nenad
On Tue, Apr 22, 2014 at 2:23 PM, Nikolay Mladenov nikiml@users.sf.netwrote:
attached is a patch
Thanks!
On Tue, Apr 22, 2014 at 11:28 PM, Nikolay Mladenov nikiml@users.sf.netwrote:
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?
Well, which one is right? I think it doesn't matter - if you don't handle
double clicks, it is the same. So, it seems just a bit more flexible this
way.
Do you agree?
Cheers,
Nenad
On Fri, May 2, 2014 at 10:55 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.
Last edit: Nikolay Mladenov 2014-05-04
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:
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)
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 am not sure I follow.
I was reading http://msdn.microsoft.com/en-us/library/windows/desktop/bb775941%28v=vs.85%29.aspx#BUTTON_DEFAULT_MESSAGE_PROCESSING
and do not see double click processing difference between BS_CHECKBOX and BS_AUTOCHECKBOX buttons.
There is no difference for Button with BS_CHECKBOX or BS_AUTOCHECKBOX, but
there would be a difference with CBitmapButton of we don't add BMPBTN_CHECK.
Cheers,
Nenad
On Mon, May 5, 2014 at 4:19 AM, Nikolay Mladenov nikiml@users.sf.netwrote:
I still do not follow.
But I would not mind if you add BMPBTN_CHECK.