学前班
最后登录1970-1-1
在线时间 小时
注册时间2015-12-13
|
emwin 回调函数中的这些消息ID是依据什么定义的,它们和回调函数在哪里发生的联系,为什么回调函数swich选择中会识别它,感觉它们是凭空产生的。
如果自己想定义一个消息应该怎样定义呢,怎样才定义呢,回调函数swich才会识别它呢
/*********************************************************************
*
* Messages Ids
*
* The following is the list of windows messages.
*/
#define WM_CREATE 0x0001 /* The first message received, right after client has actually been created */
#define WM_MOVE 0x0003 /* window has been moved (Same as WIN32) */
#define WM_SIZE 0x0005 /* Is sent to a window after its size has changed (Same as WIN32, do not change !) */
#define WM_DELETE 11 /* Delete (Destroy) command: This tells the client to free its data strutures since the window
it is associates with no longer exists.*/
#define WM_TOUCH 12 /* Touch screen message */
#define WM_TOUCH_CHILD 13 /* Touch screen message to ancestors */
#define WM_KEY 14 /* Key has been pressed */
#define WM_PAINT 0x000F /* Repaint window (because content is (partially) invalid */
#if GUI_SUPPORT_MOUSE
#define WM_MOUSEOVER 16 /* Mouse has moved, no key pressed */
#define WM_MOUSEOVER_END 18 /* Mouse has moved, no key pressed */
#endif
#define WM_PID_STATE_CHANGED 17 /* Pointer input device state has changed */
#define WM_GET_INSIDE_RECT 20 /* get inside rectangle: client rectangle minus pixels lost to effect */
#define WM_GET_ID 21 /* Get id of widget */
#define WM_SET_ID 22 /* Set id of widget */
#define WM_GET_CLIENT_WINDOW 23 /* Get window handle of client window. Default is the same as window */
#define WM_CAPTURE_RELEASED 24 /* Let window know that mouse capture is over */
#define WM_INIT_DIALOG 29 /* Inform dialog that it is ready for init */
#define WM_SET_FOCUS 30 /* Inform window that it has gotten or lost the focus */
#define WM_GET_ACCEPT_FOCUS 31 /* Find out if window can accept the focus */
#define WM_NOTIFY_CHILD_HAS_FOCUS 32 /* Sent to parent when child receives / loses focus */
#define WM_NOTIFY_OWNER_KEY 33 /* Some widgets (e.g. listbox) notify owner when receiving key messages */
#define WM_GET_BKCOLOR 34 /* Return back ground color (only frame window and similar) */
#define WM_GET_SCROLL_STATE 35 /* Query state of scroll bar */
#define WM_SET_SCROLL_STATE 36 /* Set scroll info ... only effective for scrollbars */
#define WM_NOTIFY_CLIENTCHANGE 37 /* Client area may have changed */
#define WM_NOTIFY_PARENT 38 /* Notify parent. Information is detailed as notification code */
#define WM_NOTIFY_PARENT_REFLECTION 39 /* Notify parent reflection.
Sometimes send back as a result of the WM_NOTIFY_PARENT message
to let child react on behalf of its parent.
Information is detailed as notification code */
#define WM_NOTIFY_ENABLE 40 /* Enable or disable widget */
#define WM_NOTIFY_VIS_CHANGED 41 /* Visibility of a window has or may have changed */
#define WM_HANDLE_DIALOG_STATUS 42 /* Set or get dialog status */
#define WM_GET_RADIOGROUP 43 /* Send to all siblings and children of a radio control when
selection changed */
#define WM_MENU 44 /* Send to owner window of menu widget */
#define WM_SCREENSIZE_CHANGED 45 /* Send to all windows when size of screen has changed */
#define WM_PRE_PAINT 46 /* Send to a window before it receives a WM_PAINT message */
#define WM_POST_PAINT 47 /* Send to a window after (the last) WM_PAINT message */
#define WM_MOTION 48 /* Automatic motion messages */
#define WM_TIMER 0x0113 /* Timer has expired (Keep the same as WIN32) */
#define WM_WIDGET 0x0300 /* 256 messages reserved for Widget messages */
#define WM_USER 0x0400 /* Reserved for user messages ... (Keep the same as WIN32) */
/*********************************************************************
|
|