📄 window.h
字号:
* 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); * \endcode * * \param id The identifier of the menu item or the child window. * \param code The notification code. * * \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 * int param1 = (HWND)wParam; * int param2 = (int)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_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/** * \def MSG_SETTEXT * \brief Sent to the control to set the text. * * This message is sent to the control when you calling \a SetWindowText * function to set the text. * * \code * MSG_GETTEXT * char* text_buf; * * wParam = 0; * lParam = (LPARAM)text_buf; * \endcode * * \param text_buf The pointer to a buffer contains the text. * \return The length of the text string. * * \sa SetWindowText */#define MSG_SETTEXT 0x0134/** * \def MSG_ENABLE * \brief Indicates the window is disabled/enabled. * * This message is sent to the window if the window has been disabled or enabled. * * \code * MSG_ENABLE * BOOL enabled = (BOOL)wParam; * \endcode * * \param enabled Indicates whether the window was disabled or enabled. */#define MSG_ENABLE 0x0135#define MSG_LASTCONTROLMSG 0x013F /** @} end of ctrl_msgs */ /** * \defgroup system_msgs System messages * @{ */ /* Group 9 from 0x0140 to 0x016F, the system messages. */#define MSG_FIRSTSYSTEMMSG 0x0140#define MSG_QUIT 0x0140/** * \def MSG_IDLE * \brief Indicates the system enters idle loop. * * This message is sent to the all main window when the system * enters idle loop. */#define MSG_IDLE 0x0142#define MSG_TIMEOUT 0x0143/** * \def MSG_TIMER * \brief Indicates a timer has expired. * * This message is sent to the window when a timer expired. * * \code * MSG_TIMER * int timer_id = (int)wParam; * \endcode * * \param timer_id The identifier of the timer has expired. */#define MSG_TIMER 0x0144#define MSG_CARETBLINK 0x0145#ifdef _LITE_VERSION/** * \def MSG_FDEVENT * \brief Indicates an event of registered file descriptor occurred. * * You can use \a RegisterListenFD to register a file desciptor to * MiniGUI-Lite for listening. * * When there is a read/write/except event on the fd, MiniGUI * will post a MSG_FDEVENT message with wParam being equal to * MAKELONG (fd, type), and the lParam being set to be the context * to the target window. * * \code * MSG_FDEVENT * int fd = LOWORD(wParam); * int type = HIWORD(wParam); * void* context = (void*)lParam; * \endcode * * \param fd The listened file descriptor. * \param type The event type. * \param context A context value. * * \note Only available on MiniGUI-Lite.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -