⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 window.h

📁 MiniGui在ucOS-ii下的一个例子
💻 H
📖 第 1 页 / 共 5 页
字号:
 * int ch = (int)wParam; * DWORD key_flags = (DWORD)lParam; * \endcode * * \param ch The ASCII code of the pressed key. * \param key_flags The shift key status when this message occurred. * * \sa MSG_CHAR, TranslateMessage, key_defs */#define MSG_SYSCHAR         0x0014/** * \def MSG_SYSKEYUP * \brief User releases up a key when <Alt> key is down. * * This message is posted to the current active window when the user  * releases up a key as <Alt> key is down. * * \code * MSG_SYSKEYUP * int scancode = (int)wParam; * DWORD key_flags = (DWORD)lParam; * \endcode * * \param scancode The scan code of the released key. * \param key_flags The shift key status when this message occurred. * * \sa MSG_SYSKEYDOWN, key_defs */#define MSG_SYSKEYUP        0x0015/** * \def MSG_KEYSYM * \brief A key symbol translated from MSG_KEYDOWN messages. * * This message is translated from a MSG_KEYDOWN message by \a TranslateMessage  * and sent to the current active window. * * Note that one translation may generate a key symbol made by more than one character, * e.g., when using default keymap, DEL key will generate the key symbol "^[[3~". * * \code * MSG_KEYSYM * int index = HIBYTE (wParam); * int keysym = LOBYTE (wParam); * DWORD key_flags = (DWORD)lParam; * \endcode * * \param index The index of the key symbol in one translation, zero for a new translation, *              and the \a keysym is the first symbol. * \param keysym The code of the key symbol. * \param key_flags The shift key status when this message occurred. * * \sa MSG_SYSCHAR, TranslateMessage, key_defs */#define MSG_KEYSYM  0x0016#define MSG_LASTKEYMSG      0x001F    /** @} end of key_msgs */    /**     * \defgroup post_event_msgs Post mouse/key event messages     * @{     */    /* Group 3 from 0x0020 to 0x005F, the post mouse/key event messages. */#define MSG_FIRSTPOSTMSG    0x0020/** * \def MSG_SETCURSOR * \brief Sets cursor shape in the client area. * * This message is posted to the window under the cursor when the user moves * the mouse in order to give the chance to change the cursor shape. * The default handler set the cursor shape to the default cursor of the window. * If you set a new cursor shape, your message handler should return immediately. * * \code * MSG_SETCURSOR * int cx = LOSWORD (lParam); * int cy = HISWORD (lParam); * \endcode * * \param cx,cy The client coordinates of the cursor. * * Example: * * \include setcursor.c * * \sa MSG_NCSETCURSOR */#define MSG_SETCURSOR       0x0020    #define HT_UNKNOWN          0x00    #define HT_OUT              0x01    #define HT_MENUBAR          0x02    #define HT_TRANSPARENT      0x03    #define HT_BORDER_TOP       0x04    #define HT_BORDER_BOTTOM    0x05    #define HT_BORDER_LEFT      0x06    #define HT_BORDER_RIGHT     0x07    #define HT_CORNER_TL        0x08    #define HT_CORNER_TR        0x09    #define HT_CORNER_BL        0x0A    #define HT_CORNER_BR        0x0B    #define HT_CLIENT           0x0C    #define HT_NEEDCAPTURE      0x10    #define HT_BORDER           0x11    #define HT_NCLIENT          0x12    #define HT_CAPTION          0x13    #define HT_ICON             0x14    #define HT_CLOSEBUTTON      0x15    #define HT_MAXBUTTON        0x16    #define HT_MINBUTTON        0x17    #define HT_HSCROLL          0x18    #define HT_VSCROLL          0x19        #define SBPOS_LEFTARROW     0x81    #define SBPOS_RIGHTARROW    0x82    #define SBPOS_LEFTSPACE     0x83    #define SBPOS_RIGHTSPACE    0x84    #define SBPOS_UPARROW       0x85    #define SBPOS_DOWNARROW     0x86    #define SBPOS_UPSPACE       0x87    #define SBPOS_DOWNSPACE     0x88    #define SBPOS_THUMB         0x89    #define SBPOS_UNKNOWN       0x80    #define SBPOS_MASK          0x80#define MSG_NCHITTEST       0x0021      /* this is an async message. */#define MSG_HITTEST         MSG_NCHITTEST#define MSG_CHANGESIZE      0x0022#define MSG_QUERYNCRECT     0x0023#define MSG_QUERYCLIENTAREA 0x0024/** * \def MSG_SIZECHANGING * \brief Indicates the size of the window is being changed. * * This message is sent to the window when the size is being changed. * If you want to control the actual position and size of the window when  * the size is being changed (this may be caused by \a MoveWindow or other functions),  * you should handle this message, and return the actual * position and size of the window through the second parameter. * * \code * MSG_SIZECHANGING * const RECT* rcExpect = (const RECT*)wParam; * RECT* rcResult = (RECT*)lParam; * \endcode * * \param rcExpect The expected size of the window after changing. * \param rcResult The actual size of the window after changing. * * Example: * * \include msg_sizechanging.c */#define MSG_SIZECHANGING    0x0025/** * \def MSG_SIZECHANGED * \brief Indicates the size of the window has been changed. * * This message is sent to the window when the size has been changed. * If you want adjust the size of the client area of the window,  * you should handle this message, change the values of the client area, * and return non-zero value to indicate that the client area has been modified. * * \code * MSG_SIZECHANGED * RECT* rcClient = (RECT*)lParam; * \endcode * * \param rcClient The pointer to a RECT structure which contains the new client area. *  * Example: * * \include msg_sizechanged.c */#define MSG_SIZECHANGED     0x0026/** * \def MSG_SETFOCUS * \brief Indicates that the window has gained the input focus. * * This message is sent to the window procedure  * after the window gains the input focus. */#define MSG_SETFOCUS        0x0030/** * \def MSG_KILLFOCUS * \brief Indicates that the window has lost the input focus. * * This message is sent to the window procedure  * after the window lost the input focus. */#define MSG_KILLFOCUS       0x0031/** * \def MSG_MOUSEACTIVE * \brief Indicates that the window has gained the input focus because * the user clicked the window. * * This message is sent to the window procedure  * after the user clicked the window and it has gained the input focus. */#define MSG_MOUSEACTIVE     0x0032#define MSG_ACTIVE          0x0033#define MSG_CHILDHIDDEN     0x0034    #define RCTM_CLICK          1    #define RCTM_KEY            2    #define RCTM_MESSAGE        3    #define RCTM_SHOWCTRL       4/** * \def MSG_ACTIVEMENU * \brief Indicates that the user activates the menu bar and tracks it. * * This message is sent to the window procedure when the user * activates the menu bar and tracks it. * * If you want to change the states of menu items in the submenu  * before displaying it, you can handle this message. * * \code * MSG_ACTIVEMENU * int pos = (int)wParam; * HMENU submenu = (HMENU)lParam; * \endcode *  * \param pos The position of the activated submenu. The position value of the  *      first submenu is 0. * \param submenu The handle to the activated submenu. * * Example: * * \include activemenu.c */#define MSG_ACTIVEMENU      0x0040/** * \def MSG_DEACTIVEMENU * \brief Indicates the end of the tracking of a menu bar or a popup menu. * * This message is sent to the window procedure when the user has * closed the tracking menu bar or popup menu. * * \code * MSG_DEACTIVEMENU * HMENU menubar = (HMENU)wParam; * HMENU submenu = (HMENU)lParam; * \endcode * * \param menubar The handle to the menu bar. It will be zero when the deactivated *        menu is a popup menu. * \param submenu The handle to the submenu. */#define MSG_DEACTIVEMENU    0x0041    /* Scroll bar notifying code */    #define SB_LINEUP           0x01    #define SB_LINEDOWN         0x02    #define SB_LINELEFT         0x03    #define SB_LINERIGHT        0x04    #define SB_PAGEUP           0x05    #define SB_PAGEDOWN         0x06    #define SB_PAGELEFT         0x07    #define SB_PAGERIGHT        0x08    #define SB_THUMBPOSITION    0x09    #define SB_THUMBTRACK       0x0A    #define SB_ENDSCROLL        0x0B    /** * \def MSG_HSCROLL * \brief Indicates that the user has clicked the horizontal scroll bar. * * This message is sent to the window procedure when the user has clicked * the horizontal scroll bar and changed the position of the thumb. * * \code * MSG_HSCROLL * int hs_nc = (int)wParam; * \endcode * * \param hs_nc The scrolling code, can be one of the following values: *      - SB_LINELEFT\n *        The user clicked the left arrow on the bar. *      - SB_LINERIGHT\n *        The user clicked the right arrow on the bar. *      - SB_PAGELEFT\n *        The user clicked the left page area on the bar. *      - SB_PAGERIGHT\n *        The user clicked the right page area on the bar. *      - SB_THUMBPOSITION\n *        The user set a new thumb position. *      - SB_THUMBTRACK\n *        The user is draging and tracking the thumb. *      - SB_ENDSCROLL\n *        The end of scrolling. */#define MSG_HSCROLL         0x0042/** * \def MSG_VSCROLL * \brief Indicates that the user has clicked the vertical scroll bar. * * This message is sent to the window procedure when the user has clicked * the vertical scroll bar and changed the position of the thumb. * * \code * MSG_HSCROLL * int vs_nc = (int)wParam; * \endcode * * \param vs_nc The scrolling code, can be one of the following values: *      - SB_LINEUP\n *        The user clicked the up arrow on the bar. *      - SB_LINEDOWN\n *        The user clicked the down arrow on the bar. *      - SB_PAGEUP\n *        The user clicked the up page area on the bar. *      - SB_PAGEDOWN\n *        The user clicked the down page area on the bar. *      - SB_THUMBPOSITION\n *        The user set a new thumb position. *      - SB_THUMBTRACK\n *        The user is draging and tracking the thumb. *      - SB_ENDSCROLL\n *        The end of scrolling. */#define MSG_VSCROLL         0x0043#define MSG_NCSETCURSOR     0x0044/** * \def MSG_MOUSEMOVEIN * \brief Indicates the mouse is moved in/out the area of the window. * * This message is posted to the window when the user moves the mouse * in/out the area of the window. * * \code * MSG_MOUSEMOVEIN * BOOL in_out = (BOOL)wParam; * \endcode * * \param in_out Indicates whether the mouse has been moved in the window *      or out the window. */#define MSG_MOUSEMOVEIN     0x0050#define MSG_LASTPOSTMSG     0x005F    /** @} end of post_event_msgs */    /**     * \defgroup creation_msgs Window creation messages     * @{     */    /* Group 4 from 0x0060 to 0x009F, the creation messages. */#define MSG_FIRSTCREATEMSG  0x0060/** * \def MSG_CREATE * \brief Indicates the window has been created, and gives you a chance to initialize your private objects. * * This messages is sent to the window after the window has been created and registered * to the system. You can initialize your own objects when you receive this message,  * and return zero to the system in order to indicates the success of initialization. * If you return non-zero to the system after handled this message, the created window * will be destroied immediately. * * \code * MSG_CREATE for main windows: * PMAINWINCREATE create_info = (PMAINWINCREATE)lParam; * * MSG_CREATE for controls: * HWND parent = (HWND)wParam; * DWORD add_data = (DWORD)lParam; * \endcode * * \param create_info The pointer to the MAINWINCREATE structure which is passed to *        CreateMainWindow function. * \param parent The handle to the parent window of the control. * \param add_data The first additional data passed to CreateWindow function. * * \sa CreateMainWindow, CreateWindow, MAINWINCREATE */#define MSG_CREATE          0x0060/** * \def MSG_NCCREATE * \brief Indicates the window has been created, but has not registered to the system. * * This message is sent to the window after the window has been created, but not * registered the system. Like MSG_CREATE message, you can initialize your own objects * when you receive this message, but can not create child windows of the window, and  * can not get a device context to draw. * * If you return non-zero to the system after handled this message, the created window * will be destroied immediately. * * \code * MSG_NCCREATE for main windows: * PMAINWINCREATE create_info = (PMAINWINCREATE)lParam; * * MSG_NCCREATE for controls: * DWORD add_data = (DWORD)lParam; * \endcode * * \param create_info The pointer to the MAINWINCREATE structure which is passed to *        CreateMainWindow function. * \param add_data The first additional data passed to CreateWindow function. * * \sa CreateMainWindow, CreateWindow, MAINWINCREATE */#define MSG_NCCREATE        0x0061#define MSG_INITPANES       0x0062#define MSG_DESTROYPANES    0x0063/** * \def MSG_DESTROY * \brief Indicates the window will be destroied. * * This message is sent to the window when \a DestroyMainWindow  * or \a DestroyWindow is calling. You can destroy your private objects * when receiving this message. * * If you return non-zero to the system after handle this message, the process  * of \a DestroyMainWindow and \a DestroyWindow will return immediately. * * \sa DestroyMainWindow, DestroyWindow */#define MSG_DESTROY         0x0064#define MSG_NCDESTROY       0x0065/** * \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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -