Re: double click in CBitmapButton problem.
"timza1221" <timza1221-/[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
--- In [email protected], "domehead100" <domehead100@...> wrote: > > --- In [email protected], "timza1221" <timza1221@> wrote: > > > > I have a class CCFButton : public CBitmapButtonImpl<CCFButton> > > and have taken over some left button states to perform my own states, but have No Double Click handlers. > > Works great except, if you double-click on it, it takes over all focus over full client area of application, and won't give it up, until you right-click and escape the context menu. > > Does this problem sound familiar to anybody? should I post any code? > > Thanks > > Todd. > > > > What if you add a double-click message map entry and direct it to the same handler you already use for the single click? > > Are you currently handling the BN_CLICKED or WM_LBUTTONDOWN? > > Is the parent reflecting the messages back to the button? > > ~Mike > HI, I had No handler for either, just MSG_WM_LBUTTONDOWN, MSG_WM_LBUTTONUP. To fix the problem I added MSG_WM_LBUTTONDBLCLK and called SetMsgHandled(TRUE) in the handler. This is a hack, though, for a problem that was mysterious. A user could double-click and then lose all control of the application, without any real clue of what happened, until you noticed that you double-clicked on an image button by accident. Todd. Why do you ask about the parent reflection? thanks again! ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wtl/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/wtl/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/