Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- M E W E L - <b>wm_mouseactivate</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
WM_MOUSEACTIVATE

  When a mouse button is clicked in a window, a WM_MOUSEACTIVATE message is
sent to that window to inform the window that it should be activated. If
the window does not have a titlebar, it will pass the WM_MOUSEACTIVATE up
its parent chain until it gets to a window which has a titlebar or a
top-level window is reached. The titlebar or top-level window will be the
new "active window" (an active window has a blue titlebar and an inactive
window has a gray titlebar).

The default window processing for the WM_MOUSEACTIVATE message is to pass it
up to its parent and to return whatever value the parent returned. The
possible return values are :
MA_ACTIVATE -  the  window  should  be  activated
MA_ACTIVATEANDEAT -  the  window  should  be  activated,  but  the
WM_MOUSEACTIVATE message  should  NOT  be  passed  up  to  the  parent
MA_NOACTIVATE -  the  window  should  not  be  activated  and  the
WM_MOUSEACTIVATE - message  should  NOT  be  passed  up  to  the  parent

One of the uses of the WM_MOUSEACTIVATE message in an application program is
to bring a window to the top of a stack of overlapping windows when the
mouse is clicked on a window or a child of that window. For example, if we
have a bunch of text editor windows, we can use the following code in the
editor window proc :

  case WM_MOUSEACTIVATE :
    BringWindowToTop(hWnd);
    return MA_ACTIVATEANDEAT;

Parameters
  wParam is not used.
  LOWORD(lParam) is the result of the WM_NCHITTEST message.
  HIWORD(lParam) is the mouse message which caused the WM_MOUSEACTIVATE
   message. It is usually WM_LBUTTONDOWN or WM_RBUTTONDOWN.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson