How to use the right and middle mouse buttons 
Author Message
 How to use the right and middle mouse buttons

How could I use the mouse buttons in my ATL class? How ould the functions
look like?

Thanks



Tue, 24 Dec 2002 03:00:00 GMT  
 How to use the right and middle mouse buttons

Install message handlers for WM_RBUTTONDOWN,
WM_MBUTTONDOWN, etc.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> How could I use the mouse buttons in my ATL class? How ould the functions
> look like?

> Thanks



Tue, 24 Dec 2002 03:00:00 GMT  
 How to use the right and middle mouse buttons

Thanks for answering me...

As my class wizard is not working with ATL (I don't know why) I need to know
how to manually declare the handlers WM_RBUTTONDOWN, WM_RBUTTONUP,
WM_MBUTTONDOWN and WM_MBUTTONUP

Thanks

nico

Quote:
> Install message handlers for WM_RBUTTONDOWN,
> WM_MBUTTONDOWN, etc.

> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD

> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================



> > How could I use the mouse buttons in my ATL class? How ould the
functions
> > look like?

> > Thanks



Fri, 27 Dec 2002 03:00:00 GMT  
 How to use the right and middle mouse buttons

Greets,

    The "ClassWizard" does not allow one to easily deal with ATL objects in
that fashion.  It is mainly more useful for creating ActiveX controls with
MFC.

    With regards to what you seek, switch to the ClassView pane on the
workspace area, select the class that implements the control or window,
right click, then choose "Add Windows Message Handler" from the context
menu.  This will allow one to select from a fairly decently sized list of
messages to handle.

Regards,

Joe


Quote:
> Thanks for answering me...

> As my class wizard is not working with ATL (I don't know why) I need to
know
> how to manually declare the handlers WM_RBUTTONDOWN, WM_RBUTTONUP,
> WM_MBUTTONDOWN and WM_MBUTTONUP

> Thanks

> nico


> > Install message handlers for WM_RBUTTONDOWN,
> > WM_MBUTTONDOWN, etc.

> > --
> > =====================================
> > Alexander Nickolov
> > Microsoft MVP [VC], MCSD

> > MVP VC FAQ: http://www.mvps.org/vcfaq
> > =====================================



> > > How could I use the mouse buttons in my ATL class? How ould the
> functions
> > > look like?

> > > Thanks



Fri, 27 Dec 2002 03:00:00 GMT  
 How to use the right and middle mouse buttons

Just for clarification, your class must derive from CMessageMap
(usually via CWindowImpl<>) in order for the wizard to show up.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> Greets,

>     The "ClassWizard" does not allow one to easily deal with ATL objects
in
> that fashion.  It is mainly more useful for creating ActiveX controls with
> MFC.

>     With regards to what you seek, switch to the ClassView pane on the
> workspace area, select the class that implements the control or window,
> right click, then choose "Add Windows Message Handler" from the context
> menu.  This will allow one to select from a fairly decently sized list of
> messages to handle.

> Regards,

> Joe



> > Thanks for answering me...

> > As my class wizard is not working with ATL (I don't know why) I need to
> know
> > how to manually declare the handlers WM_RBUTTONDOWN, WM_RBUTTONUP,
> > WM_MBUTTONDOWN and WM_MBUTTONUP

> > Thanks

> > nico


> > > Install message handlers for WM_RBUTTONDOWN,
> > > WM_MBUTTONDOWN, etc.

> > > --
> > > =====================================
> > > Alexander Nickolov
> > > Microsoft MVP [VC], MCSD

> > > MVP VC FAQ: http://www.mvps.org/vcfaq
> > > =====================================



> > > > How could I use the mouse buttons in my ATL class? How ould the
> > functions
> > > > look like?

> > > > Thanks



Fri, 27 Dec 2002 03:00:00 GMT  
 How to use the right and middle mouse buttons

Thanks for answering me...

As my class wizard is not working with ATL (I don't know why) I need to know
how to manually declare the handlers WM_RBUTTONDOWN, WM_RBUTTONUP,
WM_MBUTTONDOWN and WM_MBUTTONUP

Thanks


Quote:
> Just for clarification, your class must derive from CMessageMap
> (usually via CWindowImpl<>) in order for the wizard to show up.

> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD

> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================



> > Greets,

> >     The "ClassWizard" does not allow one to easily deal with ATL objects
> in
> > that fashion.  It is mainly more useful for creating ActiveX controls
with
> > MFC.

> >     With regards to what you seek, switch to the ClassView pane on the
> > workspace area, select the class that implements the control or window,
> > right click, then choose "Add Windows Message Handler" from the context
> > menu.  This will allow one to select from a fairly decently sized list
of
> > messages to handle.

> > Regards,

> > Joe



> > > Thanks for answering me...

> > > As my class wizard is not working with ATL (I don't know why) I need
to
> > know
> > > how to manually declare the handlers WM_RBUTTONDOWN, WM_RBUTTONUP,
> > > WM_MBUTTONDOWN and WM_MBUTTONUP

> > > Thanks

> > > nico


> > > > Install message handlers for WM_RBUTTONDOWN,
> > > > WM_MBUTTONDOWN, etc.

> > > > --
> > > > =====================================
> > > > Alexander Nickolov
> > > > Microsoft MVP [VC], MCSD

> > > > MVP VC FAQ: http://www.mvps.org/vcfaq
> > > > =====================================



> > > > > How could I use the mouse buttons in my ATL class? How ould the
> > > functions
> > > > > look like?

> > > > > Thanks



Sat, 28 Dec 2002 03:00:00 GMT  
 How to use the right and middle mouse buttons

An example straight from one of my dialogs:
BEGIN_MSG_MAP(CSrGeneralDlg)
 MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
 COMMAND_ID_HANDLER(IDOK, OnOK)
 COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
 COMMAND_ID_HANDLER(IDC_APPLY, OnApply)
 COMMAND_CODE_HANDLER(EN_CHANGE, OnEditChange)
 COMMAND_HANDLER(IDC_AUTOGAIN, BN_CLICKED, OnAutoGainClicked)
END_MSG_MAP()
// Handler prototypes:
//  LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
bHandled);
//  LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
bHandled);
//  LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);

 LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
&rbHandled);
 LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &rbHandled);
 LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL
&rbHandled);
 LRESULT OnApply(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &rbHandled);
 LRESULT OnEditChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL
&rbHandled);
 LRESULT OnAutoGainClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL
&rbHandled);

Beware of line wraps... Also, read the help on the various macros.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> Thanks for answering me...

> As my class wizard is not working with ATL (I don't know why) I need to
know
> how to manually declare the handlers WM_RBUTTONDOWN, WM_RBUTTONUP,
> WM_MBUTTONDOWN and WM_MBUTTONUP

> Thanks



> > Just for clarification, your class must derive from CMessageMap
> > (usually via CWindowImpl<>) in order for the wizard to show up.

> > --
> > =====================================
> > Alexander Nickolov
> > Microsoft MVP [VC], MCSD

> > MVP VC FAQ: http://www.mvps.org/vcfaq
> > =====================================



> > > Greets,

> > >     The "ClassWizard" does not allow one to easily deal with ATL
objects
> > in
> > > that fashion.  It is mainly more useful for creating ActiveX controls
> with
> > > MFC.

> > >     With regards to what you seek, switch to the ClassView pane on the
> > > workspace area, select the class that implements the control or
window,
> > > right click, then choose "Add Windows Message Handler" from the
context
> > > menu.  This will allow one to select from a fairly decently sized list
> of
> > > messages to handle.

> > > Regards,

> > > Joe



> > > > Thanks for answering me...

> > > > As my class wizard is not working with ATL (I don't know why) I need
> to
> > > know
> > > > how to manually declare the handlers WM_RBUTTONDOWN, WM_RBUTTONUP,
> > > > WM_MBUTTONDOWN and WM_MBUTTONUP

> > > > Thanks

> > > > nico


> > > > > Install message handlers for WM_RBUTTONDOWN,
> > > > > WM_MBUTTONDOWN, etc.

> > > > > --
> > > > > =====================================
> > > > > Alexander Nickolov
> > > > > Microsoft MVP [VC], MCSD

> > > > > MVP VC FAQ: http://www.mvps.org/vcfaq
> > > > > =====================================



> > > > > > How could I use the mouse buttons in my ATL class? How ould the
> > > > functions
> > > > > > look like?

> > > > > > Thanks



Sat, 28 Dec 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Middle Mouse Button Windows Messages

2. [Fwd: Right mouse button and depressed button]

3. Treeview: Right Mouse Button

4. x and y coordinates when i click right mouse button

5. Right mouse button click in CTreeView?

6. Toggling the mouse buttons from right to left

7. Selection in tree with right mouse button

8. Select Listbox item by right (!)mouse button pressing

9. Pop up menu has my program (Right Mouse Button)

10. Right button mouse click in CListBox

11. CListBox and Right Mouse button

12. Overwriting Right Mouse Button click of edit boxes

 

 
Powered by phpBB® Forum Software