a problem about "OnLButtonDblClk "
-
In my program, I create a controlbar . If I double click on the controlbar, it can get the LButtonDblClk message. Then I create an rebar on that controlbar, but if I double click on the rebar, the controlbar can't get the LButtonDblClk message. And I find if I right click on the rebar, the controlbar still can get the right-click message. It is strange.How could I get the LButtonDblClk message in the controlbar when I doubld click on the rebar? Thanks Benben
-
In my program, I create a controlbar . If I double click on the controlbar, it can get the LButtonDblClk message. Then I create an rebar on that controlbar, but if I double click on the rebar, the controlbar can't get the LButtonDblClk message. And I find if I right click on the rebar, the controlbar still can get the right-click message. It is strange.How could I get the LButtonDblClk message in the controlbar when I doubld click on the rebar? Thanks Benben
-
are you sure it is the right control that is handling the message ? (be sure it is the child class tha is doing so)
TOXCCT >>> GEII power
Yes,I don't think it is a right control. But what I mean is I want to do something when the user double click on the controlbar( include the area covered by the rebar), how should I do?(And I am sure the rebar needn't process this message).And it really work for right click message. Thanks Benben
-
Yes,I don't think it is a right control. But what I mean is I want to do something when the user double click on the controlbar( include the area covered by the rebar), how should I do?(And I am sure the rebar needn't process this message).And it really work for right click message. Thanks Benben
// Where is the mouse?
CPoint p(GetMessagePos());
ScreenToClient(&p);// Get the bounds of the control (just the client area)
CRect rect;
GetClientRect(rect);// Check the mouse is inside the control
if (rect.PtInRect(p)) {
// Do what you need here...// ...and perhaps redraw the control...
Invalidate();
}
TOXCCT >>> GEII power