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

📄 mgext.h

📁 libminigui-1.3.0.tar.gz。 miniGUI的库函数源代码!
💻 H
📖 第 1 页 / 共 4 页
字号:
#define CTRL_MONTHCALENDAR     ("MonthCalendar")/** Structure of the system time */typedef struct _SYSTEMTIME{    /** Year number of the date */    int year;    /** Month number of the date */    int month;    /** Day number of the date */    int day;    /** Weekday number of the date */    int weekday;} SYSTEMTIME;/** * \var typedef SYSTEMTIME *PSYSTEMTIME; * \brief Data type of the pointer to a SYSTEMTIME.   */typedef SYSTEMTIME *PSYSTEMTIME;/** Struture of the color info of the monthcalendar control */typedef struct _MCCOLORINFO{    /** Color of the titile background */    int clr_titlebk;    /** Color of the titile text */    int clr_titletext;    /** Color of the arrow */    int clr_arrow;    /** Color of the hilighted arrow background*/    int clr_arrowHibk;    /** Color of the week caption background */    int clr_weekcaptbk;    /** Color of the week caption text */    int clr_weekcapttext;    /** Color of the day text background */    int clr_daybk;    /** Color of the hilighted day text background */    int clr_dayHibk;    /** Color of the day text */    int clr_daytext;    /** Color of the trailing day text */    int clr_trailingtext;    /** Color of the hilighted day text */    int clr_dayHitext;} MCCOLORINFO;/** * \var typedef MCCOLORINFO *PMCCOLORINFO; * \brief Data type of the pointer to a MCCOLORINFO.   */typedef MCCOLORINFO *PMCCOLORINFO;    /**     * \defgroup mgext_ctrl_monthcal_styles Styles of monthcalendar control     * @{     *//** * \def MCS_CHN * \brief Displays chinese label. */#define MCS_CHN                 0x0001L/** * \def MCS_ENG_L * \brief Displays long english label. */#define MCS_ENG_L               0x0002L/** * \def MCS_ENG_S * \brief Displays short english label. */#define MCS_ENG_S               0x0003L/** * \def MCS_NOTIFY * \brief Notifies the parent window when something happens. */#define MCS_NOTIFY              0x0004L    /** @} end of mgext_ctrl_monthcal_styles */    /**     * \defgroup mgext_ctrl_monthcal_msgs Messages of monthcalendar control     * @{     *//** * \def MCM_GETCURDAY * \brief Gets the day number of the current selected date. * * \code * MCM_GETCURDAY * * wParam = 0; * lParam = 0; * \endcode * * \return The day number of the current selected date. */#define MCM_GETCURDAY           0xF300/** * \def MCM_GETCURMONTH * \brief Gets the month number of the current selected date. * * \code * MCM_GETCURMONTH * * wParam = 0; * lParam = 0; * \endcode * * \return The month number of the current selected date. */#define MCM_GETCURMONTH         0xF301/** * \def MCM_GETCURYEAR * \brief Gets the year number of the current selected date. * * \code * MCM_GETCURYEAR * * wParam = 0; * lParam = 0; * \endcode * * \return The year number of the current selected date. */#define MCM_GETCURYEAR          0xF302/** * \def MCM_GETCURWEEKDAY * \brief Gets the weekday number of the current selected date. * * \code * MCM_GETCURWEEKDAY * * wParam = 0; * lParam = 0; * \endcode * * \return The weekday number of the current selected date. */#define MCM_GETCURWEEKDAY       0xF303/** * \def MCM_GETCURMONLEN * \brief Gets the month length of the current selected date. * * \code * MCM_GETCURMONLEN * * wParam = 0; * lParam = 0; * \endcode * * \return The month length of the current selected date. */#define MCM_GETCURMONLEN        0xF304/** * \def MCM_SETCURDAY * \brief Changes the day of the currently selected date. * * \code * MCM_SETCURDAY * int newday; * * wParam = (WPARAM)newday; * lParam = 0; * \endcode * * \param newday The new day number of the currently selected date. */#define MCM_SETCURDAY           0xF305/** * \def MCM_SETCURMONTH * \brief Changes the month of the currently selected date. * * \code * MCM_SETCURMONTH * int newmonth; * * wParam = (WPARAM)newmonth; * lParam = 0; * \endcode * * \param newmonth The new month number of the currently selected date. */#define MCM_SETCURMONTH         0xF306/** * \def MCM_SETCURYEAR * \brief Changes the year of the currently selected date. * * \code * MCM_SETCURYEAR * int newyear; * * wParam = (WPARAM)newyear; * lParam = 0; * \endcode * * \param newyear The new year number of the currently selected date. */#define MCM_SETCURYEAR          0xF307/** * \def MCM_SETTODAY * \brief Sets the currently selected date as the date of "today". * * \code * MCM_SETTODAY * * wParam = 0; * lParam = 0; * \endcode */#define MCM_SETTODAY            0xF308/** * \def MCM_GETFIRSTWEEKDAY * \brief Gets the first day of the week. * * \code * MCM_GETFIRSTWEEKDAY * * wParam = 0; * lParam = 0; * \endcode * * \return The first day of the week. */#define MCM_GETFIRSTWEEKDAY     0xF309/** * \def MCM_GETCURDATE * \brief Gets the currently selected date. * * \code * MCM_GETCURDATE * PSYSTEMTIME pcurdate; * * wParam = 0; * lParam = (LPARAM)pcurdate; * \endcode * * \param pcurdate Pointer to the SYSTEMTIME structure to retreive the date. */#define MCM_GETCURDATE          0xF310/** * \def MCM_GETTODAY * \brief Gets the date of "today". * * \code * MCM_GETTODAY * PSYSTEMTIME pcurdate; * * wParam = 0; * lParam = (LPARAM)pcurdate; * \endcode * * \param pcurdate Pointer to the SYSTEMTIME structure to retreive the  *             date of "today". */#define MCM_GETTODAY            0xF311/** * \def MCM_GETMINREQRECTW * \brief Gets the minimum width required to display a full month in a month  *         calendar control. * * \code * MCM_GETMINREQRECTW * * wParam = 0; * lParam = 0; * \endcode * * \return The minimum width required to dispaly a full month. */#define MCM_GETMINREQRECTW      0xF312/** * \def MCM_GETMINREQRECTH * \brief Gets the minimum height required to display a full month in a month  *         calendar control. * * \code * MCM_GETMINREQRECTH * * wParam = 0; * lParam = 0; * \endcode * * \return The minimum height required to dispaly a full month. */#define MCM_GETMINREQRECTH      0xF313/** * \def MCM_SETCURDATE * \brief Sets the currently selected date. * * \code * MCM_SETCURDATE * PSYSTEMTIME pcurdate; * * wParam = 0; * lParam = (LPARAM)pcurdate; * \endcode * * \param pcurdate Pointer to the SYSTEMTIME structure storing the values of  *             the current selected date. */#define MCM_SETCURDATE          0xF314/** * \def MCM_SETCOLOR * \brief Sets the color of the monthcalendar control. * * \code * MCM_SETCOLOR * PMCCOLORINFO newcolor; * * wParam = 0; * lParam = (LPARAM)newcolor; * \endcode * * \param newcolor Pointer to the MCCOLORINFO structure storing the vaules of  *             the new color info. */#define MCM_SETCOLOR            0xF315/** * \def MCM_GETCOLOR * \brief Gets the color of the monthcalendar control. * * \code * MCM_GETCOLOR * PMCCOLORINFO color; * * wParam = 0; * lParam = (LPARAM)color; * \endcode * * \param color Pointer to the MCCOLORINFO structure retreiving the color info. */#define MCM_GETCOLOR            0xF316    /** @} end of mgext_ctrl_monthcal_msgs */    /**     * \defgroup mgext_ctrl_monthcal_ncs Notification codes of monthcalendar control     * @{     *//** * \def MCN_DATECHANGE * \brief Notifies that the currently selected date is changed. */#define MCN_DATECHANGE          1#define MCN_DAYCHANGE           2    /** @} end of mgext_ctrl_monthcal_ncs */    /** @} end of mgext_ctrl_monthcal */#endif /* _EXT_CTRL_MONTHCAL *//********************** Spin Control *****************************************/#ifdef _EXT_CTRL_SPINBOX    /**     * \defgroup mgext_ctrl_spinbox SpinBox control     * @{     *//** * \def CTRL_SPINBOX * \brief The class name of spinbox control. */#define CTRL_SPINBOX                ("SpinBox")#define SPINBOX_WIDTH           13#define SPINBOX_HEIGHT          16/** Structure of the spinbox info */typedef struct _SPININFO{    /** Maximum position value */    int max;    /** Minimum position value */    int min;    /** Current position value */    int cur;} SPININFO;/** * \var typedef SPININFO *PSPININFO; * \brief Data type of the pointer to a SPININFO. */typedef SPININFO *PSPININFO;    /**     * \defgroup mgext_ctrl_spinbox_styles Styles of spinbox control     * @{     *//** * \def SPS_AUTOSCROLL * \brief The spinbox control can automatically scroll,  *        and disable itself when reach maximal or minimal value. */#define SPS_AUTOSCROLL          0x00000001L    /** @} end of mgext_ctrl_spinbox_styles */    /**     * \defgroup mgext_ctrl_spinbox_msgs Messages of spinbox control     * @{     */#define KS_SPINPOST             0x00010000/** * \def SPM_SETTARGET * \brief Sets the target window of the spinbox. * * When the user click the up or down arrow of the spin box, it will * emulate the down and up of the key SCANCODE_CURSORBLOCKUP or * SCANCODE_CURSORBLOCKDOWN, and post MSG_KEYDOWN and MSG_KEYUP * message to the target window. Note that the shifit key status of the * message will have the flag KS_SPINPOST set. * * \code * SPM_SETTARGET * HWND hTarget; * * wParam = 0; * lParam = (LPARAM)hTarget; * \endcode * * \param hTarget Handle of the target window. * \return Always be zero. */#define SPM_SETTARGET           0xF300/** * \def SPM_GETTARGET * \brief Gets the target window of the spinbox. * * \code * SPM_GETTARGET * * wParam = 0; * lParam = 0; * \endcode * * \return The handle to the target window. */#define SPM_GETTARGET           0xF301/** * \def SPM_SETINFO * \brief Sets the parameter information of the spinbox. * * \code * SPM_SETINFO * PSPININFO newinfo; * * wParam = 0; * lParam = (LPARAM)newinfo; * \endcode * * \param newinfo Pointer to the SPININFO structure storing the new spinbox info. * * \return Zero on success, -1 to indicate invalid parameter. * * \sa SPININFO */#define SPM_SETINFO             0xF302/** * \def SPM_GETINFO * \brief Gets the parameter infos of the spinbox. * * \code * SPM_GETINFO * PSPININFO info; * * wParam = 0; * lParam = (LPARAM)info; * \endcode * * \param info Pointer to the SPININFO structure retreiving the spinbox info. * * \return Zero on success, -1 to indicate invalid parameter. * * \sa SPININFO */#define SPM_GETINFO             0xF303/** * \def SPM_DISABLEUP * \brief Disable the ability to scroll up. * * \code * SPM_DISABLEUP * * wParam = 0; * lParam = 0; * \endcode * * \return Always be zero. */#define SPM_DISABLEUP           0xF304/** * \def SPM_DISABLEDOWN * \brief Disable the ability to scroll down. * * \code * SPM_DISABLEDOWN * * wParam = 0; * lParam = 0; * \endcode * * \return Always be zero. */#define SPM_DISABLEDOWN         0xF305/** * \def SPM_ENABLEUP * \brief Enable the ability to scroll up. * * \code * SPM_ENABLEUP * * wParam = 0; * lParam = 0; * \endcode * * \return Always be zero. */#define SPM_ENABLEUP            0xF306/** * \def SPM_ENABLEDOWN * \brief Enable the ability to scroll down. * * \code * SPM_ENABLEDOWN * * wParam = 0; * lParam = 0; * \endcode * * \return Always be zero. */#define SPM_ENABLEDOWN          0xF307/** * \def SPM_SETCUR * \brief Sets the current position in the range of the spinbox. * * \code * SPM_SETCUR * int pos; * * wParam = (WPARAM)pos; * lParam = 0; * \endcode * * \param pos The current position to set. * * \return Zero on success, -1 to indicate invalid parameter. */#define SPM_SETCUR              0xF308/** * \def SPM_GETCUR * \brief Gets the current position in the range of the spinbox. * * \code * SPM_GETCUR * * wParam = 0; * lParam = 0; * \endcode * * \return The current position in the range of the spinbox. */#define SPM_GETCUR              0xF309    /** @} end of mgext_ctrl_spinbox_msgs */    /**     * \defgroup mgext_ctrl_spinbox_ncs Notification codes of spinbox control     * @{     *//** * \def SPN_REACHMIN * \brief Notifies that the spin box has reached the minimum limit. */#define SPN_REACHMIN            1/** * \def SPN_REACHMAX * \brief Notifies that the spin box has reached the maximum limit. */#define SPN_REACHMAX            2    /** @} end of mgext_ctrl_spinbox_ncs */

⌨️ 快捷键说明

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