Mouse event messages
[Messages]

Defines


Define Documentation

#define MSG_LBUTTONDBLCLK   0x0003

Left mouse button double clicked message.

This message is posted to the window when the user double clicks the left button of the mouse in the client area of the window.

 MSG_LBUTTONDBLCLK
 DWORD key_flags = (DWORD)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
key_flags The shift key status when this message occurred.
x_pos,y_pos The position of the mouse in client coordinates.
See also:
MSG_RBUTTONDBLCLK, Macros for key codes and shift status

Definition at line 120 of file window.h.

#define MSG_LBUTTONDOWN   0x0001

Left mouse button down message.

This message is posted to the window when the user presses down the left button of the mouse in the client area of the window.

 MSG_LBUTTONDOWN
 DWORD key_flags = (DWORD)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
key_flags The shift key status when this message occurred.
x_pos,y_pos The position of the mouse in client coordinates.
See also:
MSG_LBUTTONUP, Macros for key codes and shift status

Example:

/*
 * This example trys to handle the event when the user presses 
 * left button and right button of the mouse at the same time.
 */
int MyWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
{
    switch (message) {
        case MSG_LBUTTONDOWN:
            if (wParam & KS_RIGHTBUTTON) {
                // Left button and right button both are pressed.
                break;
            }
            break;

        case MSG_RBUTTONDOWN:
            if (wParam & KS_LEFTBUTTON) {
                // Left button and right button both are pressed.
                break;
            }
            break;

        case MSG_MOUSEMOVE:
            if (wParam & KS_CTRL) {
                // User moves the mouse as the <Ctrl> key is down.
                break;
            }
            break;

        ...
    }

    return DefaultMainWinProc (hWnd, message, wParam, lParam);
}

Definition at line 78 of file window.h.

#define MSG_LBUTTONUP   0x0002

Left mouse button up message.

This message is posted to the window when the user releases up the left button of the mouse in the client area of the window.

 MSG_LBUTTONUP
 DWORD key_flags = (DWORD)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
key_flags The shift key status when this message occurred.
x_pos,y_pos The position of the mouse in client coordinates.
See also:
MSG_LBUTTONDOWN, Macros for key codes and shift status

Definition at line 99 of file window.h.

#define MSG_MOUSEMOVE   0x0004

The mouse moved message.

This message is posted to the window when the user moves the mouse in the client area of the window.

 MSG_MOUSEMOVE
 DWORD key_flags = (DWORD)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
key_flags The shift key status when this message occurred.
x_pos,y_pos The position of the mouse in client coordinates.
See also:
Macros for key codes and shift status

Definition at line 141 of file window.h.

#define MSG_NCLBUTTONDBLCLK   0x000A

Left mouse button double clicked in the non-client area.

This message is posted to the window when the user double clicks the left button of the mouse in the non-client area of the window.

 MSG_NCLBUTTONDBLCLK
 int hit_code = (int)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
hit_code The hit test code which tells the area of the mouse.
x_pos,y_pos The position of the mouse in window coordinates.
See also:
MSG_NCRBUTTONDBLCLK, MSG_NCHITTEST

Definition at line 272 of file window.h.

#define MSG_NCLBUTTONDOWN   0x0008

Left mouse button down message in the non-client area.

This message is posted to the window when the user presses down the left button of the mouse in the non-client area of the window.

 MSG_NCLBUTTONDOWN
 int hit_code = (int)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
hit_code The hit test code which tells the area of the mouse.
x_pos,y_pos The position of the mouse in window coordinates.
See also:
MSG_NCLBUTTONUP, MSG_NCHITTEST

Definition at line 230 of file window.h.

#define MSG_NCLBUTTONUP   0x0009

Left mouse button up message in the non-client area.

This message is posted to the window when the user releases up the left button of the mouse in the non-client area of the window.

 MSG_NCLBUTTONUP
 int hit_code = (int)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
hit_code The hit test code which tells the area of the mouse.
x_pos,y_pos The position of the mouse in window coordinates.
See also:
MSG_NCLBUTTONDOWN, MSG_NCHITTEST

Definition at line 251 of file window.h.

#define MSG_NCMOUSEMOVE   0x000B

Mouse moves in the non-client area.

This message is posted to the window when the user moves the mouse in the non-client area of the window.

 MSG_NCMOUSEMOVE
 int hit_code = (int)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
hit_code The hit test code which tells the area of the mouse.
x_pos,y_pos The position of the mouse in window coordinates.
See also:
MSG_NCHITTEST

Definition at line 293 of file window.h.

#define MSG_NCRBUTTONDBLCLK   0x000E

Right mouse button double clicked in the non-client area.

This message is posted to the window when the user double clicks the right button of the mouse in the non-client area of the window.

 MSG_NCRBUTTONDBLCLK
 int hit_code = (int)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
hit_code The hit test code which tells the area of the mouse.
x_pos,y_pos The position of the mouse in window coordinates.
See also:
MSG_NCLBUTTONDBLCLK, MSG_NCHITTEST

Definition at line 356 of file window.h.

#define MSG_NCRBUTTONDOWN   0x000C

Right mouse button down message in the non-client area.

This message is posted to the window when the user presses down the right button of the mouse in the non-client area of the window.

 MSG_NCRBUTTONDOWN
 int hit_code = (int)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
hit_code The hit test code which tells the area of the mouse.
x_pos,y_pos The position of the mouse in window coordinates.
See also:
MSG_NCRBUTTONUP, MSG_NCHITTEST

Definition at line 314 of file window.h.

#define MSG_NCRBUTTONUP   0x000D

Right mouse button up message in the non-client area.

This message is posted to the window when the user releases up the right button of the mouse in the non-client area of the window.

 MSG_NCRBUTTONUP
 int hit_code = (int)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
hit_code The hit test code which tells the area of the mouse.
x_pos,y_pos The position of the mouse in window coordinates.
See also:
MSG_NCRBUTTONDOWN, MSG_NCHITTEST

Definition at line 335 of file window.h.

#define MSG_RBUTTONDBLCLK   0x0007

Right mouse button double clicked message.

This message is posted to the window when the user double clicks the right button of the mouse in the client area of the window.

 MSG_RBUTTONDBLCLK
 DWORD key_flags = (DWORD)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
key_flags The shift key status when this message occurred.
x_pos,y_pos The position of the mouse in client coordinates.
See also:
MSG_LBUTTONDBLCLK, Macros for key codes and shift status

Definition at line 207 of file window.h.

#define MSG_RBUTTONDOWN   0x0005

Right mouse button down message.

This message is posted to the window when the user presses down the right button of the mouse in the client area of the window.

 MSG_RBUTTONDOWN
 DWORD key_flags = (DWORD)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
key_flags The shift key status when this message occurred.
x_pos,y_pos The position of the mouse in client coordinates.
See also:
MSG_RBUTTONUP, Macros for key codes and shift status

Example:

/*
 * This example trys to handle the event when the user presses 
 * left button and right button of the mouse at the same time.
 */
int MyWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam)
{
    switch (message) {
        case MSG_LBUTTONDOWN:
            if (wParam & KS_RIGHTBUTTON) {
                // Left button and right button both are pressed.
                break;
            }
            break;

        case MSG_RBUTTONDOWN:
            if (wParam & KS_LEFTBUTTON) {
                // Left button and right button both are pressed.
                break;
            }
            break;

        case MSG_MOUSEMOVE:
            if (wParam & KS_CTRL) {
                // User moves the mouse as the <Ctrl> key is down.
                break;
            }
            break;

        ...
    }

    return DefaultMainWinProc (hWnd, message, wParam, lParam);
}

Definition at line 165 of file window.h.

#define MSG_RBUTTONUP   0x0006

Right mouse button up message.

This message is posted to the window when the user releases up the right button of the mouse in the client area of the window.

 MSG_RBUTTONUP
 DWORD key_flags = (DWORD)wParam;
 int x_pos = LOSWORD (lParam);
 int y_pos = HISWORD (lParam);
Parameters:
key_flags The shift key status when this message occurred.
x_pos,y_pos The position of the mouse in client coordinates.
See also:
MSG_RBUTTONDOWN, Macros for key codes and shift status

Definition at line 186 of file window.h.

Generated on Thu Apr 7 15:55:38 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3