Re: Mouse events

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
.



Relevant Pages

  • Re: Outlook closing improperly and minimized opening
    ... moving the window out by dragging and then exit does not ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Mouse events
    ... dragging) over the client area of window, ... Visual C++ MVP ...
    (microsoft.public.vc.mfc)
  • Re: Transparent window
    ... > I'm looking for a way to make transparent a form's client area while ... > dragging it onto the desktop. ... the client area content disappears and instead we see what there is ... > under the window, ...
    (alt.comp.lang.borland-delphi)
  • Transparent window
    ... I'm looking for a way to make transparent a form's client area while ... dragging it onto the desktop. ... when I click down on the window ...
    (alt.comp.lang.borland-delphi)
  • OnMove Event
    ... I need the OnMove event to be fired while ... moving a windows. ... If the check "Show window contents while dragging" under ... Do anyone know a way to track the window while it is moved even when the ...
    (microsoft.public.vsnet.general)