MiniGUI API Reference (MiniGUI-Processes)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Macros
Mouse event messages

Macros

#define MSG_LBUTTONDOWN   0x0001
 Left mouse button down message. More...
 
#define MSG_LBUTTONUP   0x0002
 Left mouse button up message. More...
 
#define MSG_LBUTTONDBLCLK   0x0003
 Left mouse button double clicked message. More...
 
#define MSG_MOUSEMOVE   0x0004
 The mouse moved message. More...
 
#define MSG_RBUTTONDOWN   0x0005
 Right mouse button down message. More...
 
#define MSG_RBUTTONUP   0x0006
 Right mouse button up message. More...
 
#define MSG_RBUTTONDBLCLK   0x0007
 Right mouse button double clicked message. More...
 
#define MSG_MBUTTONDOWN   0x0008
 Middle mouse button down message. More...
 
#define MSG_MBUTTONUP   0x0009
 Middle mouse button up message. More...
 
#define MSG_MBUTTONDBLCLK   0x000A
 Middle mouse button double clicked message. More...
 
#define MSG_NCLBUTTONDOWN   0x000B
 Left mouse button down message in the non-client area. More...
 
#define MSG_NCLBUTTONUP   0x000C
 Left mouse button up message in the non-client area. More...
 
#define MSG_NCLBUTTONDBLCLK   0x000D
 Left mouse button double clicked in the non-client area. More...
 
#define MSG_NCMOUSEMOVE   0x000E
 Mouse moves in the non-client area. More...
 
#define MSG_NCRBUTTONDOWN   0x000F
 Right mouse button down message in the non-client area. More...
 
#define MSG_NCRBUTTONUP   0x0010
 Right mouse button up message in the non-client area. More...
 
#define MSG_NCRBUTTONDBLCLK   0x0011
 Right mouse button double clicked in the non-client area. More...
 
#define MSG_NCMBUTTONDOWN   0x0012
 Middle mouse button down message in the non-client area. More...
 
#define MSG_NCMBUTTONUP   0x0013
 Middle mouse button up message in the non-client area. More...
 
#define MSG_NCMBUTTONDBLCLK   0x0014
 Middle mouse button double clicked in the non-client area. More...
 

Detailed Description

Macro Definition Documentation

◆ MSG_LBUTTONDBLCLK

#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.

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

Definition at line 166 of file window.h.

◆ MSG_LBUTTONDOWN

#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.

DWORD key_flags = (DWORD)wParam;
int x_pos = LOSWORD (lParam);
int y_pos = HISWORD (lParam);
Parameters
key_flagsThe shift key status when this message occurred.
x_pos,y_posThe 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.
*/
LRESULT MyWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
if (wParam & KS_RIGHTBUTTON) {
// Left button and right button both are pressed.
break;
}
break;
if (wParam & KS_LEFTBUTTON) {
// Left button and right button both are pressed.
break;
}
break;
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 124 of file window.h.

◆ MSG_LBUTTONUP

#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.

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

Definition at line 145 of file window.h.

◆ MSG_MBUTTONDBLCLK

#define MSG_MBUTTONDBLCLK   0x000A

Middle mouse button double clicked message.

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

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

Definition at line 320 of file window.h.

◆ MSG_MBUTTONDOWN

#define MSG_MBUTTONDOWN   0x0008

Middle mouse button down message.

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

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

Since 4.0.0

Definition at line 276 of file window.h.

◆ MSG_MBUTTONUP

#define MSG_MBUTTONUP   0x0009

Middle mouse button up message.

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

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

Since 4.0.0

Definition at line 299 of file window.h.

◆ MSG_MOUSEMOVE

#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.

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

Definition at line 187 of file window.h.

◆ MSG_NCLBUTTONDBLCLK

#define MSG_NCLBUTTONDBLCLK   0x000D

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.

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

Definition at line 385 of file window.h.

◆ MSG_NCLBUTTONDOWN

#define MSG_NCLBUTTONDOWN   0x000B

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.

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

Definition at line 343 of file window.h.

◆ MSG_NCLBUTTONUP

#define MSG_NCLBUTTONUP   0x000C

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.

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

Definition at line 364 of file window.h.

◆ MSG_NCMBUTTONDBLCLK

#define MSG_NCMBUTTONDBLCLK   0x0014

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

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

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

Definition at line 532 of file window.h.

◆ MSG_NCMBUTTONDOWN

#define MSG_NCMBUTTONDOWN   0x0012

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

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

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

Definition at line 490 of file window.h.

◆ MSG_NCMBUTTONUP

#define MSG_NCMBUTTONUP   0x0013

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

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

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

Definition at line 511 of file window.h.

◆ MSG_NCMOUSEMOVE

#define MSG_NCMOUSEMOVE   0x000E

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.

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

Definition at line 406 of file window.h.

◆ MSG_NCRBUTTONDBLCLK

#define MSG_NCRBUTTONDBLCLK   0x0011

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.

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

Definition at line 469 of file window.h.

◆ MSG_NCRBUTTONDOWN

#define MSG_NCRBUTTONDOWN   0x000F

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.

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

Definition at line 427 of file window.h.

◆ MSG_NCRBUTTONUP

#define MSG_NCRBUTTONUP   0x0010

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.

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

Definition at line 448 of file window.h.

◆ MSG_RBUTTONDBLCLK

#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.

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

Definition at line 253 of file window.h.

◆ MSG_RBUTTONDOWN

#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.

DWORD key_flags = (DWORD)wParam;
int x_pos = LOSWORD (lParam);
int y_pos = HISWORD (lParam);
Parameters
key_flagsThe shift key status when this message occurred.
x_pos,y_posThe 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.
*/
LRESULT MyWinProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
if (wParam & KS_RIGHTBUTTON) {
// Left button and right button both are pressed.
break;
}
break;
if (wParam & KS_LEFTBUTTON) {
// Left button and right button both are pressed.
break;
}
break;
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 211 of file window.h.

◆ MSG_RBUTTONUP

#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.

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

Definition at line 232 of file window.h.

MSG_NCLBUTTONUP
#define MSG_NCLBUTTONUP
Left mouse button up message in the non-client area.
Definition: window.h:364
MSG_LBUTTONDOWN
#define MSG_LBUTTONDOWN
Left mouse button down message.
Definition: window.h:124
DWORD
DWORD_PTR DWORD
A unsigned long type definition for pointer precision.
Definition: common.h:604
HWND
GHANDLE HWND
Handle to main window or control.
Definition: common.h:407
MSG_NCRBUTTONDBLCLK
#define MSG_NCRBUTTONDBLCLK
Right mouse button double clicked in the non-client area.
Definition: window.h:469
MSG_RBUTTONDOWN
#define MSG_RBUTTONDOWN
Right mouse button down message.
Definition: window.h:211
MSG_NCRBUTTONUP
#define MSG_NCRBUTTONUP
Right mouse button up message in the non-client area.
Definition: window.h:448
WPARAM
UINT_PTR WPARAM
A type definition for the first message paramter.
Definition: common.h:706
LRESULT
LONG_PTR LRESULT
Signed result of message processing.
Definition: common.h:583
UINT
unsigned int UINT
A type definition for unsigned integer.
Definition: common.h:664
HISWORD
#define HISWORD(l)
Returns the high signed word of the double word l.
Definition: common.h:837
MSG_NCMBUTTONDBLCLK
#define MSG_NCMBUTTONDBLCLK
Middle mouse button double clicked in the non-client area.
Definition: window.h:532
MSG_NCMBUTTONUP
#define MSG_NCMBUTTONUP
Middle mouse button up message in the non-client area.
Definition: window.h:511
KS_RIGHTBUTTON
#define KS_RIGHTBUTTON
This status indicate that right button was pressed when the key or mouse message posted to the window...
Definition: common.h:1776
KS_LEFTBUTTON
#define KS_LEFTBUTTON
This status indicate that left button was pressed when the key or mouse message posted to the window.
Definition: common.h:1767
MSG_MBUTTONUP
#define MSG_MBUTTONUP
Middle mouse button up message.
Definition: window.h:299
MSG_NCMBUTTONDOWN
#define MSG_NCMBUTTONDOWN
Middle mouse button down message in the non-client area.
Definition: window.h:490
MSG_NCLBUTTONDOWN
#define MSG_NCLBUTTONDOWN
Left mouse button down message in the non-client area.
Definition: window.h:343
MSG_NCLBUTTONDBLCLK
#define MSG_NCLBUTTONDBLCLK
Left mouse button double clicked in the non-client area.
Definition: window.h:385
MSG_MBUTTONDOWN
#define MSG_MBUTTONDOWN
Middle mouse button down message.
Definition: window.h:276
MSG_NCMOUSEMOVE
#define MSG_NCMOUSEMOVE
Mouse moves in the non-client area.
Definition: window.h:406
MSG_LBUTTONDBLCLK
#define MSG_LBUTTONDBLCLK
Left mouse button double clicked message.
Definition: window.h:166
KS_CTRL
#define KS_CTRL
This status indicate that either the left-Ctrl key or the right-Ctrl key was pressed when the key or ...
Definition: common.h:1697
DefaultMainWinProc
#define DefaultMainWinProc
Is the default main window callback procedure.
Definition: window.h:7383
LOSWORD
#define LOSWORD(l)
Returns the low signed word of the double word l.
Definition: common.h:830
MSG_RBUTTONUP
#define MSG_RBUTTONUP
Right mouse button up message.
Definition: window.h:232
MSG_NCRBUTTONDOWN
#define MSG_NCRBUTTONDOWN
Right mouse button down message in the non-client area.
Definition: window.h:427
LPARAM
UINT_PTR LPARAM
A type definition for the second message paramter.
Definition: common.h:712
MSG_MBUTTONDBLCLK
#define MSG_MBUTTONDBLCLK
Middle mouse button double clicked message.
Definition: window.h:320
MSG_RBUTTONDBLCLK
#define MSG_RBUTTONDBLCLK
Right mouse button double clicked message.
Definition: window.h:253
MSG_MOUSEMOVE
#define MSG_MOUSEMOVE
The mouse moved message.
Definition: window.h:187
MSG_LBUTTONUP
#define MSG_LBUTTONUP
Left mouse button up message.
Definition: window.h:145