Re: Getting Mouse events inside a modeless dialog
"domehead100" <[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
--- In [email protected], "amante1il" <is.aviv@...> wrote: > > Hi Guys, > > Thank you all for the answers, but for some reason, i still don't get the WM_LBUTTONDBLCLK. > > I added in my CMainFrm the IsDialogMessage: > BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) > { > if(CWindow::IsDialogMessage(pMsg)) > return TRUE; > > if(CFrameWindowImpl<CMainFrame>::PreTranslateMessage(pMsg)) > return TRUE; > > return m_view.PreTranslateMessage(pMsg); > } > > But no mouse events arrives to my Modeless Dialog. > > Thanks, > Don > > --- In [email protected], "domehead100" <domehead100@> wrote: > > > > --- In [email protected], "amante1il" <is.aviv@> wrote: > > > > > > Hi, > > > > > > I have a modeless dialog: > > > CCommentViewDialog : public CDialogImpl<CCommentViewDialog>, public CDialogRegionT<CCommentViewDialog> > > > > > > But even when i add: > > > MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnMouseLeftDblClick) > > > > > > I don't get any Windows Messsages for the mouse in the dialogs. > > > > > > Any ideas? > > > > > > Thanks, > > > Don > > > > > > > Have a look at: > > > > http://tech.groups.yahoo.com/group/wtl/message/15894 > > > > ~Mike > > > Not sure if someone already mentioned this, but the WM_LBUTTONDBLCLICK goes to the window that is clicked, not to the parent dialog. If you are clicking on a child control (rather than the dialog itself) and your handler is in the dialog rather than a subclassed control, you will either want to handle it directly in PreTranslateMessage or use CContainedWindow to subclass the child controls in the parent dialog itself. ~Mike ------------------------------------ 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/