Re: Mouse events
- From: "Doug Harrison [MVP]" <dsh@xxxxxxxx>
- Date: Sat, 02 Sep 2006 15:57:11 -0500
On 2 Sep 2006 00:43:42 -0700, "Adrian" <richard.the.lionheart@xxxxxxxxx>
wrote:
I am working on a 3D model viewer using MFC. I want to set a variable -
'renderMode' to GL_SELECT whenever my mouse is moving(only moving not
dragging) over the client area of window, and to GL_RENDER when the
mouse is either dragging in client area or is in the non client area of
my window. How could I achieve it, I mean what code should go in which
event handler?
You would need to handle WM_MOUSEMOVE and WM_NCMOUSEMOVE. Concerning the
dragging, you should be using SetCapture when the dragging is initiated
(typically WM_LBUTTONDOWN) and ReleaseCapture when the dragging is
terminated (typically WM_LBUTTONUP and WM_CANCELMODE).
--
Doug Harrison
Visual C++ MVP
.
- Follow-Ups:
- Re: Mouse events
- From: Adrian
- Re: Mouse events
- References:
- Mouse events
- From: Adrian
- Mouse events
- Prev by Date: Re: How does this work?
- Next by Date: Re: Layout of Dialog (screen resolutions, font sizes etc)
- Previous by thread: Mouse events
- Next by thread: Re: Mouse events
- Index(es):
Relevant Pages
|