📄 window.h
字号:
* \def MSG_CLOSE * \brief Indicates the user has clicked the closing box on the caption. * * This message is sent to the window when the user has clicked the closing box * on the caption of the window. */#define MSG_CLOSE 0x0066#define MSG_NCCALCSIZE 0x0067/** * \def MSG_MAXIMIZE * \brief Indicates the user has clicked the maximizing box on the caption. * * This message is sent to the window when the user has clicked the maximizing box * on the caption of the window. */#define MSG_MAXIMIZE 0x0068/** * \def MSG_MINIMIZE * \brief Indicates the user has clicked the minimizing box on the caption. * * This message is sent to the window when the user has clicked the minimizing box * on the caption of the window. */#define MSG_MINIMIZE 0x0069#define MSG_LASTCREATEMSG 0x009F /** @} end of creation_msgs */ /** * \defgroup paint_msgs Window painting messages * @{ */ /* Group 5 from 0x00A0 to 0x00CF, the paint messages. */#define MSG_FIRSTPAINTMSG 0x00A0/** * \def MSG_SHOWWINDOW * \brief Indicates that the window has been shown or hidden. * * This message is sent to the window when the window has been shown * or hidden (due to the calling of the function ShowWindow). * * \code * MSG_SHOWWINDOW * int show_cmd = (int)wParam; * \endcode * * \param show_cmd The command to show or hide, can be one of * the following values: * - SW_SHOW\n * Shows the window. * - SW_HIDE\n * Hides the window. * - SW_SHOWNORMAL\n * Shows the window, and if the window is a main window * sets it to be the topmost main window. * * \sa ShowWindow */#define MSG_SHOWWINDOW 0x00A0 /** * \def MSG_ERASEBKGND * \brief Sent to the window to erase the background. * * This message is sent to the window if the whole or a part of the background * should be erased. * * \code * MSG_ERASEBKGND * const RECT* inv_rect = (const RECT*)lParam; * \endcode * * \param inv_rect The pointer to a RECT structure contains the rectangle * should be erase. The rectangle is in client coordinates system. * If it is NULL, the whole client area should be erased. */#define MSG_ERASEBKGND 0x00B0 /* this is an async message. *//** * \def MSG_PAINT * \brief Sent to the window if the window contains an invalid region. * * This message is sent to the window if the window contains an invalid region. * * \code * MSG_PAINT * const CLIPRGN* inv_rgn = (const CLIPRGN*) lParam; * \endcode * * \param inv_rgn The pointer to the invalid region of the window. */#define MSG_PAINT 0x00B1#define MSG_NCPAINT 0x00B2#define MSG_NCACTIVATE 0x00B3#define MSG_SYNCPAINT 0x00B4#define MSG_LASTPAINTMSG 0x00CF /** @} end of paint_msgs */ /** * \defgroup desktop_msgs Internal desktop messages * @{ */ /* Group 6 from 0x00D0 to 0x00EF, the internal desktop messages. */#define MSG_FIRSTSESSIONMSG 0x00D0#define MSG_STARTSESSION 0x00D0#define MSG_QUERYENDSESSION 0x00D1#define MSG_ENDSESSION 0x00D2#define MSG_REINITSESSION 0x00D3#if defined(_LITE_VERSION) && !defined(_STAND_ALONE) #define MSG_NEWCLIENT 0x00D4 #define MSG_DELCLIENT 0x00D5 #define MSG_TOPMOSTCHANGED 0x00D6#endif /* _LITE_VERSION && !_STAND_ALONE */#define MSG_ERASEDESKTOP 0x00E0#define MSG_PAINTDESKTOP 0x00E1#define MSG_DT_MOUSEOFF 0x00E1#define MSG_DT_LBUTTONDOWN 0x00E2#define MSG_DT_LBUTTONUP 0x00E3#define MSG_DT_LBUTTONDBLCLK 0x00E4#define MSG_DT_MOUSEMOVE 0x00E5#define MSG_DT_RBUTTONDOWN 0x00E6#define MSG_DT_RBUTTONUP 0x00E7#define MSG_DT_RBUTTONDBLCLK 0x00E8#define MSG_DT_KEYOFF 0x00DA #define MSG_DT_KEYDOWN 0x00EA#define MSG_DT_CHAR 0x00EB#define MSG_DT_KEYUP 0x00EC#define MSG_DT_SYSKEYDOWN 0x00ED#define MSG_DT_SYSCHAR 0x00EE#define MSG_DT_SYSKEYUP 0x00EF#define MSG_LASTSESSIONMSG 0x00EF /** @} end of desktop_msgs */ /** * \defgroup window_msgs Internal window management messages * @{ */ /* Group 7 from 0x00F0 to 0x010F, Internal window management messages. */#define MSG_FIRSTWINDOWMSG 0x00F0#define MSG_ADDNEWMAINWIN 0x00F0#define MSG_REMOVEMAINWIN 0x00F1#define MSG_MOVETOTOPMOST 0x00F2 #define MSG_SETACTIVEMAIN 0x00F3#define MSG_GETACTIVEMAIN 0x00F4#define MSG_SHOWMAINWIN 0x00F5#define MSG_HIDEMAINWIN 0x00F6#define MSG_MOVEMAINWIN 0x00F7#define MSG_SETCAPTURE 0x00F8#define MSG_GETCAPTURE 0x00F9#define MSG_ENDTRACKMENU 0x00FA#define MSG_TRACKPOPUPMENU 0x00FB#define MSG_CLOSEMENU 0x00FC#define MSG_SCROLLMAINWIN 0x00FD#define MSG_CARET_CREATE 0x00FE#define MSG_CARET_DESTROY 0x00FF#define MSG_ENABLEMAINWIN 0x0100#define MSG_ISENABLED 0x0101#define MSG_SETWINCURSOR 0x0102#define MSG_GETNEXTMAINWIN 0x0103#define MSG_SHOWGLOBALCTRL 0x010A#define MSG_HIDEGLOBALCTRL 0x010B#define MSG_LASTWINDOWMSG 0x010F /** @} end of window_msgs */ /** * \defgroup ctrl_msgs Dialog and control messages * @{ */ /* Group 8 from 0x0120 to 0x013F, the dialog and control messages. */#define MSG_FIRSTCONTROLMSG 0x0120/** * \def MSG_COMMAND * \brief The command message, indicates a notification message from child window, * or the user has selected a menu item. * * This message sent to the window when the user has selected a menu item, or * a child window has sent a notification message to the parent. * * \code * MSG_COMMAND * int id = LOWORD(wParam); * int code = HIWORD(wParam); * HWND hwnd = (HWND)lParam; * \endcode * * \param id The identifier of the menu item or the child window. * \param code The notification code. * \param hwnd The handle to the control. * * \sa NotifyParent */#define MSG_COMMAND 0x0120#define MSG_SYSCOMMAND 0x0121#define MSG_GETDLGCODE 0x0122/** * \def MSG_INITDIALOG * \brief Ready to initialize the controls in a dialog box. * * This message is sent to the dialog in order that you can initialize the controls * in the dialog box. * * \code * MSG_INITDIALOG * HWND focus_hwnd = (HWND)wParam; * LPARAM lparam = (LPARAM)lParam; * \endcode * * \param focus_hwnd The handle to the control which will gain the input focus. * \param lparam The parameter passed into the dialog box * through \a DialogBoxIndirectParam function. * \return Returns non-zero value to set the input focus to \a focus_hwnd, else do not set focus. * * \sa DialogBoxIndirectParam * * Example: * * \include msg_initdialog.c */#define MSG_INITDIALOG 0x0123#define MSG_NEXTDLGCTRL 0x0124#define MSG_ENTERIDLE 0x0125#define MSG_DLG_GETDEFID 0x0126#define MSG_DLG_SETDEFID 0x0127#define MSG_DLG_REPOSITION 0x0128/** * \def MSG_INITPAGE * \brief Ready to initialize the controls in a property page. * * This message is sent to the page in order that you can initialize the controls * in the page. * * \code * MSG_INITPAGE * DWORD add_data = (DWORD)lParam; * \endcode * * \param add_data The additional data in DLGTEMPLATE structure passed * through PSM_ADDPAGE message. * * \sa ctrl_propsheet */#define MSG_INITPAGE 0x0129/** * \def MSG_SHOWPAGE * \brief Indicates the page will be shown or hidden. * * This message is sent to the page when the page will be shown or hidden. * * \code * MSG_SHOWPAGE * HWND focus_hwnd = (HWND)wParam; * int show_cmd = (int)lParam; * \endcode * * \param focus_hwnd The handle to the child which will gain the input focus * if showing the page. * \param show_cmd The show command, can be one of the following values: * - SW_SHOW\n The page will be shown. * - SW_HIDE\n The page will be hidden. * * \sa ctrl_propsheet */#define MSG_SHOWPAGE 0x012A/** * \def MSG_SHEETCMD * \brief Indicates that a PSM_SHEETCMD message had been sent to the PropertySheet * control. * * This message is sent to the property page when the property sheet contains the page * received the PSM_SHEETCMD message. * * \code * MSG_SHEETCMD * WPARAM param1 = wParam; * LPARAM param2 = lParam; * \endcode * * \param param1 The wParam of PSM_SHEETCMD message. * \param param2 The lParam of PSM_SHEETCMD message. * * \sa ctrl_propsheet, PSM_SHEETCMD */#define MSG_SHEETCMD 0x012B/** * \def MSG_INITCONTAINER * \brief This message will be sent to the container window procedure after * the container window is created. * * This message is sent to the container in order that you can initialize the controls * in the container. * * \code * MSG_INITCONTAINER * DWORD add_data = (DWORD)lParam; * \endcode * * \param add_data The additional data in CONTAINERINFO structure passed * through the argument of dwAddData when creating the ScrollView control * by calling CreateWindowEx. * * \sa ctrl_scrollview, CONTAINERINFO */#define MSG_INITCONTAINER 0x012C/** * \def MSG_SVCONTCMD * \brief This message will be sent to the parent of the ScrollView control when * the container of the ScrollView control reveived a MSG_COMMAND message. * * This message will be sent to the parent of the ScrollView when * the container of the ScrollView control reveived a MSG_COMMAND message. * Generally, the notification of the child control in the container will be * sent via MSG_COMMAND to the container. If you have not defined your own * window procedure for the container, this message gives a chance for the parent * of the ScrollView control to handle the notifications come from the controls * in the container. * * Note that you can also define user window procedure for the container, and * handle the notification from the child control in this procedure. * * \code * MSG_SVCONTCMD * WPARAM param1 = wParam; * WPARAM param2 = lParam; * \endcode * * \param param1 The wParam of MSG_COMMAND message. * \param param2 The lParam of MSG_COMMAND message. * * \sa ctrl_scrollview, MSG_COMMAND */#define MSG_SVCONTCMD 0x012D/** * \def MSG_FREEZECTRL * \brief You can send this message to freeze or thaw the paint action of the control. * * note implemented only in scrollview and listview. * * \code * MSG_FREEZECTRL * BOOL bFrozen; * * wParam = bFrozen * lParam = 0; * * \endcode * * \param bFrozen to freeze or to thaw. * * return zero. */#define MSG_FREEZECTRL 0x012E/** * \def MSG_FONTCHANGING * \brief Indicates the user is trying to change the font of the window. * * This message is sent to the window when the user is trying to change * the font of the window by calling \a SetWindowFont. * If you return non-zero after handling this message, \a SetWindowFont * will return immediately, i.e., the default window font will not change. * * \code * MSG_FONTCHANGING * PLOGFONT log_font = (PLOGFONT)lParam; * \endcode * * \param log_font The pointer to the new window logical font. * * \sa SetWindowFont */#define MSG_FONTCHANGING 0x0130/** * \def MSG_FONTCHANGED * \brief Indicates the window font has been changed. * * This message is sent to the window after the window font has changed. * Some window should be repainted to reflect the new window font. */#define MSG_FONTCHANGED 0x0131/** * \def MSG_GETTEXTLENGTH * \brief Sent to the control to get the length of the text. * * This message is sent to the control when you calling \a GetWindowTextLength * function to get the lenght of the text. * * \code * MSG_GETTEXTLENGTH * wParam = 0; * lParam = 0; * \endcode * * \return The length of the text. * * \sa GetWindowTextLength */#define MSG_GETTEXTLENGTH 0x0132/** * \def MSG_GETTEXT * \brief Sent to the control to get the text. * * This message is sent to the control when you calling \a GetWindowText * function to get the text. * * \code * MSG_GETTEXT * int max_len; * char* text_buf; * * wParam = (WPARAM)max_len; * lParam = (LPARAM)text_buf; * \endcode * * \param max_len The maximal number of characters can be copied to the buffer. * \param text_buf The pointer to a buffer receives the text. * \return The length of the window text string. * * \sa GetWindowText */#define MSG_GETTEXT 0x0133
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -