control.h
资源名称:GPRS_work.rar [点击查看]
上传用户:sdaoma
上传日期:2013-08-07
资源大小:3838k
文件大小:161k
源码类别:
GPS编程
开发平台:
C/C++
- * a non-zero value to indicate an invalid chage so that the sheet can stop
- * to close the sheet window. You can tell the pages which action should
- * be taken by passing a value through the WPARAM parameter of the message.
- *
- * code
- * PSM_SHEETCMD
- * WPARAM wParam;
- * LPARAM lParam;
- *
- * wParam = (WPARAM)wParam;
- * lParam = (LPARAM)lParam;
- * endcode
- *
- * param wParam The WPARAM parameter of the MSG_SHEETCMD message.
- * param lParam The LPARAM parameter of the MSG_SHEETCMD message.
- *
- * return The message has been broken by a page, the value will be
- * (page_index + 1); Zero indicates no page asserts an error.
- */
- #define PSM_SHEETCMD 0xF1D2L
- #define PSM_MSGMAX 0xF1E0L
- /** @} end of ctrl_propsheet_msgs */
- /**
- * defgroup ctrl_propsheet_ncs Notification codes of propertysheet control
- * @{
- */
- /**
- * def PSN_ACTIVE_CHANGED
- * brief Notifies the parent window that the active page of
- * the propsheet has been changed.
- */
- #define PSN_ACTIVE_CHANGED 0x01
- /** @} end of ctrl_propsheet_ncs */
- int GUIAPI DefaultPageProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
- /** @} end of ctrl_propsheet */
- #endif /* _CTRL_PROPSHEET*/
- /****** Combo Box Control *****************************************************/
- #ifdef _CTRL_COMBOBOX
- /**
- * defgroup ctrl_combobox ComboBox control
- * @{
- */
- /**
- * def CTRL_COMBOBOX
- * brief The class name of combobox control.
- */
- #define CTRL_COMBOBOX ("combobox")
- /**
- * defgroup ctrl_combobox_styles Styles of combobox control
- * @{
- */
- /**
- * def CBS_SIMPLE
- * brief Displays the list box at all times.
- *
- * The current selection in the list box is displayed in the edit control.
- *
- * note The argument a dwAddData of a CreateWindowEx function should be the
- * expected height of the list box.
- *
- * code
- * int listbox_height = 100;
- *
- * CreateWindowEx (CTRL_COMBOBOX, ..., listbox_height);
- * endcode
- */
- #define CBS_SIMPLE 0x0000L
- /**
- * def CBS_AUTOSPIN
- * brief Creates AutoSpin box.
- *
- * AutoSpin box has an input field with a spin button. The input field
- * displays an integer, and you can click spin button to increase or
- * decrease the value of the integer.
- */
- #define CBS_AUTOSPIN 0x0001L
- /**
- * def CBS_SPINLIST
- * brief Creates SpinList box.
- *
- * SpinList box has an input field with a spin button. The input field
- * displays some text, and you can click spin button to change the text.
- * The candidate text string comes from the strings you add to the box.
- */
- #define CBS_SPINLIST 0x0002L
- /**
- * def CBS_DROPDOWNLIST
- * brief Specifies a drop-down list box in the selection filed.
- *
- * note The argument a dwAddData of a CreateWindowEx function should be the
- * expected height of the list box.
- *
- * code
- * int listbox_height = 100;
- *
- * CreateWindowEx (CTRL_COMBOBOX, ..., listbox_height));
- * endcode
- */
- #define CBS_DROPDOWNLIST 0x0003L
- #define CBS_TYPEMASK 0x0007L
- /**
- * def CBS_NOTIFY
- * brief Notifies the parent window.
- *
- * Causes the combo box to notify the parent window
- * with a notification message.
- */
- #define CBS_NOTIFY 0x0008L
- /**
- * def CBS_SPINARROW_TOPBOTTOM
- * brief The spin arrow
- */
- #define CBS_SPINARROW_TOPBOTTOM 0x0010L
- /**
- * def CBS_SPINARROW_LEFTRIGHT
- * brief The spin arrow
- */
- #define CBS_SPINARROW_LEFTRIGHT 0x0020L
- #define CBS_AUTOHSCROLL 0x0040L
- #define CBS_DISABLENOSCROLL 0x0080L
- /**
- * def CBS_SORT
- * brief Automatically sorts strings entered in the list box.
- */
- #define CBS_SORT 0x0100L
- /**
- * def CBS_AUTOLOOP
- * brief Loops the value automatically if the type of combobox is CBS_AUTOSPIN.
- */
- #define CBS_AUTOLOOP 0x0200L
- /**
- * def CBS_EDITNOBORDER
- * brief The edit box has no border.
- */
- #define CBS_EDITNOBORDER 0x0400L
- /**
- * def CBS_EDITBASELINE
- * brief The edit box has base line.
- */
- #define CBS_EDITBASELINE 0x0800L
- /**
- * def CBS_READONLY
- * brief The edit field is read-only.
- */
- #define CBS_READONLY 0x1000L
- /**
- * def CBS_UPPERCASE
- * brief The edit field is uppercase.
- */
- #define CBS_UPPERCASE 0x2000L
- /**
- * def CBS_LOWERCASE
- * brief The edit field is lowercase.
- */
- #define CBS_LOWERCASE 0x4000L
- /**
- * def CBS_AUTOFOCUS
- * brief The edit field will gain the focus automatically.
- */
- #define CBS_AUTOFOCUS 0x8000L
- /** @} end of ctrl_combobox_styles */
- /**
- * defgroup ctrl_combobox_msgs Messages of combobox control
- * @{
- */
- /**
- * def CB_GETEDITSEL
- * brief Gets the starting and ending character positions of the current
- * selection.
- *
- * An application sends a CB_GETEDITSEL message to get the starting and ending
- * character positions of the current selection in the edit control of a combo box.
- *
- * code
- * CB_GETEDITSEL
- * int start;
- * int end;
- *
- * wParam = (WPARAM)&start;
- * lParam = (LPARAM)&end;
- * endcode
- *
- * param start Pointer to a 32-bit value that receives the starting
- * position of the selection.
- * param end Pointer to a 32-bit value that receives the ending
- * position of the selection.
- *
- * note Not implemented yet.
- */
- #define CB_GETEDITSEL 0xF140
- /**
- * def CB_LIMITTEXT
- * brief Limits the length of text in the edit control.
- *
- * An application sends a CB_LIMITTEXT message to limit the length of the text
- * the user may type into the edit control of a combo box.
- *
- * code
- * CB_LIMITTEXT
- * int newLimit;
- *
- * wParam = (WPARAM)newLimit;
- * lParam = 0;
- * endcode
- *
- * param newLimit Specifies the maximum number of characters the user can enter.
- *
- * return The return value is always zero.
- */
- #define CB_LIMITTEXT 0xF141
- /**
- * def CB_SETEDITSEL
- * brief Sets the starting and ending character positions of the current
- * selection.
- *
- * An application sends a CB_SETEDITSEL message to set the starting and ending
- * character positions of the current selection in the edit control of a combo box.
- *
- * code
- * CB_SETEDITSEL
- * int start;
- * int end;
- *
- * wParam = (WPARAM)start;
- * lParam = (LPARAM)end;
- * endcode
- *
- * param start The starting position of the selection.
- * param end The ending position of the selection.
- *
- * note Not implemented yet.
- */
- #define CB_SETEDITSEL 0xF142
- /**
- * def CB_ADDSTRING
- * brief Adds a string to the list box of a combo box.
- *
- * An application sends a CB_ADDSTRING message to add a string to the list box
- * of a combo box.
- *
- * code
- * CB_ADDSTRING
- * char* string;
- *
- * wParam = 0;
- * lParam = (LPARAM)string;
- * endcode
- *
- * param string Pointer to the null-terminated string to be added.
- *
- * return The index of the new item on success, else the one of
- * the following error codes:
- *
- * - CB_ERRSPACE No memory can be allocated for new item.
- * - CB_ERR Invalid passed arguments.
- */
- #define CB_ADDSTRING 0xF143
- /**
- * def CB_DELETESTRING
- * brief Deletes a string in the list box of a combo box.
- *
- * An application sends a CB_DELETESTRING message to delete a string in the list box
- * of a combo box.
- *
- * code
- * CB_DELETESTRING
- * int index;
- *
- * wParam = (WPARAM)index;
- * lParam = 0;
- * endcode
- *
- * param index Specifies the index of the string to delete.
- *
- * return If succeed, return zero; otherwise CB_ERR.
- */
- #define CB_DELETESTRING 0xF144
- #define CB_DIR 0xF145
- /**
- * def CB_GETCOUNT
- * brief Retreives the number of items in the list box of a combo box.
- *
- * An application sends a CB_GETCOUNT message to retreive the number of items
- * in the list box of a combo box.
- *
- * code
- * CB_GETCOUNT
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return The number of items in the list box.
- */
- #define CB_GETCOUNT 0xF146
- /**
- * def CB_GETCURSEL
- * brief Retreives the index of the currently selected item in the list box.
- *
- * An application sends a CB_GETCURSEL message to retreive the index of the
- * currently selected item in the list box of a combo box.
- *
- * code
- * CB_GETCURSEL
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return The index of currently selected item in the list box if have one;
- * otherwise CB_ERR.
- */
- #define CB_GETCURSEL 0xF147
- /**
- * def CB_GETLBTEXT
- * brief Retreives the string of an item in the list box.
- *
- * An application sends a CB_GETLBTEXT message to retreive the string of
- * a specified item in the list box of a combo box.
- *
- * code
- * CB_GETLBTEXT
- * int index;
- * char* string;
- *
- * wParam = (WPARAM)index;
- * lParam = (LPARAM)string;
- * endcode
- *
- * param index The index of the selected item.
- * param string Pointer to the string buffer.
- *
- * return One of the following values:
- * - CB_OKAYn Success.
- * - CB_ERRn Invalid item index.
- */
- #define CB_GETLBTEXT 0xF148
- /**
- * def CB_GETLBTEXTLEN
- * brief Gets the string length of an item in the list box.
- *
- * An application sends a CB_GETLBTEXTLEN message to get the string length
- * of a specified item in the list box of a combo box.
- *
- * code
- * CB_GETLBTEXTLEN
- * int index;
- *
- * wParam = (WPARAM)index;
- * lParam = 0;
- * endcode
- *
- * param index The index of the specified item.
- *
- * return The length of the string on success; otherwise CB_ERR.
- */
- #define CB_GETLBTEXTLEN 0xF149
- /**
- * def CB_INSERTSTRING
- * brief Inserts a string to the list box of a combo box.
- *
- * An application sends a CB_INSERTSTRING message to insert a string to the list
- * box of a combo box. Unlike the CB_ADDSTRING message, the CB_INSERTSTRING message
- * do not cause a list to be sorted.
- *
- * code
- * CB_INSERTSTRING
- * int index;
- * char* string;
- *
- * wParam = (WPARAM)index;
- * lParam = (LPARAM)string;
- * endcode
- *
- * param index The index of the position at which to insert the string.
- * param string Pointer to the null-terminated string to be added.
- *
- * return The index of the new item on success, else the one of
- * the following error codes:
- *
- * - CB_ERRSPACE No memory can be allocated for new item.
- * - CB_ERR Invalid passed arguments.
- */
- #define CB_INSERTSTRING 0xF14A
- /**
- * def CB_RESETCONTENT
- * brief Removes all items from the list box and edit control.
- *
- * An application sends a CB_RESETCONTENT message remove all items from the list
- * box and edit control of a combo box.
- *
- * code
- * CB_RESETCONTENT
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Always be zero.
- */
- #define CB_RESETCONTENT 0xF14B
- /**
- * def CB_FINDSTRING
- * brief Searchs the list box for an item beginning with the characters in a
- * specified string.
- *
- * An application sends a CB_FINDSTRING message to search the list box for an
- * item beginning with the characters in a specified string.
- *
- * code
- * CB_FINDSTRING
- * int indexStart;
- * char* string;
- *
- * wParam = (WPARAM)indexStart;
- * lParam = (LPARAM)string;
- * endcode
- *
- * param indexStart Index of the item preceding the first item to be searched.
- * param string Pointer to the null-terminated string that contains the prefix
- * to search for.
- *
- * return The index of the matching item or CB_ERR to indicate not found.
- */
- #define CB_FINDSTRING 0xF14C
- #define CB_SELECTSTRING 0xF14D
- /**
- * def CB_SETCURSEL
- * brief Selects a string in the list of a combo box.
- *
- * code
- * CB_SETCURLSEL
- * int index;
- *
- * wParam = (WPARAM)index;
- * lParam = 0;
- * endcode
- *
- * param index The index of the string to select.
- *
- * return CB_OKAY on success; otherwise CB_ERR to indicate an invalid index.
- */
- #define CB_SETCURSEL 0xF14E
- #define CB_SHOWDROPDOWN 0xF14F
- /**
- * def CB_GETITEMADDDATA
- * brief Retreives the application-supplied 32-bit value associated with the
- * specified item.
- *
- * An application sends an CB_GETITEMADDDATA message to retrive the 32-bit data
- * value associated with with an item in the list box of the combo box.
- *
- * code
- * CB_GETITEMADDDATA
- * int index;
- *
- * wParam = (WPARAM)index;
- * lParam = 0;
- * endcode
- *
- * param index The index of the item.
- *
- * return The 32-bit data value associated with an item on success, otherwise
- * CB_ERR to indicate an error.
- */
- #define CB_GETITEMADDDATA 0xF150
- /**
- * def CB_SETITEMADDDATA
- * brief Sets a 32-bit data value with the specified item.
- *
- * An application sends an CB_SETITEMADDDATA message to associate a 32-bit data
- * value specified in the lParam parameter with an item in the list box that
- * is specified in the wParam parameter.
- *
- * code
- * CB_SETITEMADDDATA
- * int index;
- * DWORD addData;
- *
- * wParam = (WPARAM)index;
- * lParam = (LPARAM)addData;
- * endcode
- *
- * param index The index of the specified item.
- * param addData the 32-bit data value which will associated with the item.
- *
- * return One of the following values:
- * - CB_OKAYn Success
- * - CB_ERRn Invalid item index
- */
- #define CB_SETITEMADDDATA 0xF151
- /**
- * def CB_GETDROPPEDCONTROLRECT
- * brief Retreives the screen coordinates of the dropdown list box of a combo box.
- *
- * code
- * CB_GETDROPPEDCONTROLRECT
- * RECT *rect;
- *
- * wParam = 0;
- * lParam = (LPARAM)rect;
- * endcode
- *
- * param rect Pointer to the RECT structure used to save the coordinates.
- */
- #define CB_GETDROPPEDCONTROLRECT 0xF152
- /**
- * def CB_SETITEMHEIGHT
- * brief Sets the height of all items of the list box in a combo box.
- *
- * An application sends an CB_SETITEMHEIGHT message to set the height of
- * all items of the list box in a combo box.
- *
- * code
- * CB_SETITEMHEIGHT
- * int itemHeight;
- *
- * wParam = 0;
- * lParam = (LPARAM)itemHeight;
- * endcode
- *
- * param itemHeight New height of item of the list box.
- *
- * return The effective height of item of the list box.
- */
- #define CB_SETITEMHEIGHT 0xF153
- /**
- * def CB_GETITEMHEIGHT
- * brief Gets the height of items of the list box in a combo box.
- *
- * code
- * CB_GETITEMHEIGHT
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return The height of item in the list box.
- */
- #define CB_GETITEMHEIGHT 0xF154
- #define CB_SETEXTENDEDUI 0xF155
- #define CB_GETEXTENDEDUI 0xF156
- /**
- * def CB_GETDROPPEDSTATE
- * brief Determines whether the list box of a combo box is dropped down.
- *
- * code
- * CB_GETIDROPSTATE
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return If the list box is visible, the return value is TRUE;
- * otherwise, it is FALSE.
- */
- #define CB_GETDROPPEDSTATE 0xF157
- /**
- * def CB_FINDSTRINGEXACT
- * brief Searchs the list box for an item that matches the specified string.
- *
- * An application sends a CB_FINDSTRINGEXACT message to search the list box for an
- * item that matches a specified string.
- *
- * code
- * CB_FINDSTRINGEXACT
- * int indexStart;
- * char* string;
- *
- * wParam = (WPARAM)indexStart;
- * lParam = (LPARAM)string;
- * endcode
- *
- * param indexStart Index of the item preceding the first item to be searched.
- * param string Pointer to the null-terminated string to search for.
- *
- * return The index of the matching item; otherwise CB_ERR to indicate not found.
- */
- #define CB_FINDSTRINGEXACT 0xF158
- #define CB_SETLOCALE 0xF159
- #define CB_GETLOCALE 0xF15A
- #define CB_GETTOPINDEX 0xF15b
- #define CB_SETTOPINDEX 0xF15c
- #define CB_GETHORIZONTALEXTENT 0xF15d
- #define CB_SETHORIZONTALEXTENT 0xF15e
- #define CB_GETDROPPEDWIDTH 0xF15f
- #define CB_SETDROPPEDWIDTH 0xF160
- #define CB_INITSTORAGE 0xF161
- /**
- * def CB_SETSPINFORMAT
- * brief Sets the format string of value for CBS_AUTOSPIN type.
- *
- * code
- * CB_SETSPINFORMAT
- * const char* format;
- *
- * wParam = 0;
- * lParam = (LPARAM)format;
- * endcode
- *
- * param format A format string can be used by a sprintf function
- * to format an interger.
- *
- * return CB_OKAY on success; otherwise CB_ERR.
- */
- #define CB_SETSPINFORMAT 0xF162
- /**
- * def CB_SETSPINRANGE
- * brief Determines the range of the spin box in a combo box.
- *
- * code
- * CB_SETSPINRANGE
- * int new_min;
- * int new_max;
- *
- * wParam = (WPARAM)new_min;
- * lParam = (LPARAM)new_max;
- * endcode
- *
- * param new_min The new minimum value of the spin box.
- * param new_max The new maximum value of the spin box.
- *
- * return CB_OKAY on success; otherwise CB_ERR to indicate invalid parameters.
- */
- #define CB_SETSPINRANGE 0xF163
- /**
- * def CB_GETSPINRANGE
- * brief Gets the range of the spin box in a combo box.
- *
- * code
- * CB_GETSPINRANGE
- * int *spin_min;
- * int *spin_max;
- *
- * wParam = (WPARAM)spin_min;
- * lParam = (LPARAM)spin_max;
- * endcode
- *
- * param spin_min The minimum value of the spin box.
- * param spin_max The maximum value of the spin box.
- *
- * return Always be CB_OKAY.
- */
- #define CB_GETSPINRANGE 0xF164
- /**
- * def CB_SETSPINVALUE
- * brief Determines the value of the spin box in a combo box.
- *
- * code
- * CB_SETSPINVALUE
- * int new_value;
- *
- * wParam = (WPARAM)new_value;
- * lParam = 0;
- * endcode
- *
- * param new_value The new value of the spin box.
- *
- * return CB_OKAY on success; otherwise CB_ERR to indicate invalid parameters.
- */
- #define CB_SETSPINVALUE 0xF165
- /**
- * def CB_GETSPINVALUE
- * brief Gets the current value of the spin box in a combo box.
- *
- * code
- * CB_GETSPINVALUE
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return The current value of the spin box.
- */
- #define CB_GETSPINVALUE 0xF166
- /**
- * def CB_SETSPINPACE
- * brief Determines the pace and the fast pace of the spin box in a combo box.
- *
- * code
- * CB_SETSPINPACE
- * int new_pace;
- * int new_fastpace;
- *
- * wParam = (WPARAM)new_pace;
- * lParam = (LPARAM)new_fastpace;
- * endcode
- *
- * param new_pace The new pace value of the spin box.
- * param new_fastpace The new fast pace value of the spin box.
- *
- * return Always be CB_OKAY.
- */
- #define CB_SETSPINPACE 0xF167
- /**
- * def CB_GETSPINPACE
- * brief Gets the pace and the fast pace of the spin box in a combo box.
- *
- * code
- * CB_GETSPINPACE
- * int *spin_pace;
- * int *spin_fastpace;
- *
- * wParam = (WPARAM)spin_pace;
- * lParam = (LPARAM)spin_fastpace;
- * endcode
- *
- * param spin_pace Pointer to the data to retreive the new pace value of the spin box.
- * param spin_fastpace Pointer to the data to retreive the new fast pace value of the spin box.
- *
- * return Always be CB_OKAY.
- */
- #define CB_GETSPINPACE 0xF168
- /**
- * def CB_SPIN
- * brief Spins the value of the spin box or auto spin box.
- *
- * code
- * CB_SPIN
- *
- * int direct;
- *
- * wParam = direct;
- * lParam = 0;
- * endcode
- *
- * param direct Indicats the direct of the spin. Zero means up, non-zero down.
- *
- * return Always be CB_OKAY.
- */
- #define CB_SPIN 0xF170
- /**
- * def CB_FASTSPIN
- * brief Fast spins the value of the spin box or auto spin box.
- *
- * code
- * CB_FASTSPIN
- *
- * int direct
- *
- * wParam = direct;
- * lParam = 0;
- * endcode
- *
- * param direct Indicats the direct of the spin. Zero means up, non-zero down.
- *
- * return Always be CB_OKAY.
- */
- #define CB_FASTSPIN 0xF171
- /**
- * def CB_SETSTRCMPFUNC
- * brief Sets the STRCMP function used to sort items.
- *
- * An application sends a CB_SETSTRCMPFUNC message to set a
- * new STRCMP function to sort items in the combo-box.
- *
- * Note that you should send this message before adding
- * any item to the combo-box control.
- *
- * code
- * static int my_strcmp (const char* s1, const char* s2, size_t n)
- * {
- * ...
- * return 0;
- * }
- *
- * CB_SETSTRCMPFUNC
- *
- * wParam = 0;
- * lParam = (LPARAM) my_strcmp;
- * endcode
- *
- * param my_strcmp Your own function to compare two strings.
- *
- * return One of the following values:
- * - CB_OKAYn
- * Success
- * - CB_ERRn
- * This combobox has no list box or it is not an empty list box.
- */
- #define CB_SETSTRCMPFUNC 0xF172
- /**
- * def CB_GETCHILDREN
- * brief Gets the handles to the children of a ComboBox control.
- *
- * An application sends a CB_GETCHILDREN message to get the handles
- * to the children of a ComboBox control.
- *
- * code
- * CB_GETCHILDREN
- *
- * HWND *wnd_edit, *wnd_listbox;
- *
- * wParam = (WPARAM)wnd_edit;
- * lParam = (LPARAM)wnd_listbox;
- * endcode
- *
- * param wnd_edit The buffer saving the handle to the edit box of the ComboBox control.
- * param wnd_list The buffer saving the handle to the list box of the ComboBox control.
- * If the ComboBox have type of CBS_AUTOSPIN, handle to the list box will be 0.
- *
- * return Always be CB_OKAY.
- */
- #define CB_GETCHILDREN 0xF173
- #define CB_MSGMAX 0xF180
- /** @} end of ctrl_combobox_msgs */
- /* Combo Box return value */
- #define CB_OKAY LB_OKAY
- #define CB_ERR LB_ERR
- #define CB_ERRSPACE LB_ERRSPACE
- /**
- * defgroup ctrl_combobox_ncs Notification codes of combobox control
- * @{
- */
- #define CBN_ERRSPACE 255
- /**
- * def CBN_SELCHANGE
- * brief Notifies the change of the current selection.
- *
- * The CBN_SELCHANGE notification code is sent when the user changes the current
- * selection in the list box of a combo box.
- */
- #define CBN_SELCHANGE 1
- /**
- * def CBN_DBLCLK
- * brief Notifies the user has double clicked an item.
- *
- * A combo box created with the CBS_NOTIFY style sends an CBN_DBLCLK notification
- * message to its parent window when the user double-clicks a string in its listbox.
- */
- #define CBN_DBLCLK 2
- /**
- * def CBN_SETFOCUS
- * brief Notifies the box has gained the input focus.
- */
- #define CBN_SETFOCUS 3
- /**
- * def CBN_KILLFOCUS
- * brief Notifies the box has lost the input focus.
- */
- #define CBN_KILLFOCUS 4
- /**
- * def CBN_EDITCHANGE
- * brief Notifies the change of the text in the edit control.
- *
- * The CBN_EDITCHANGE notification code is sent when the user has taken an action
- * that may have altered the text in the edit control portion of a combo box.
- */
- #define CBN_EDITCHANGE 5
- #define CBN_EDITUPDATE 6
- /**
- * def CBN_DROPDOWN
- * brief Notifies the list box has been dropped down.
- */
- #define CBN_DROPDOWN 7
- /**
- * def CBN_CLOSEUP
- * brief Notifies the list box has been closed up.
- */
- #define CBN_CLOSEUP 8
- /**
- * def CBN_SELENDOK
- * brief Notifies the selection of a list item.
- *
- * The CBN_SELENDOK notification code is sent when the user has
- * selected a list item.
- */
- #define CBN_SELENDOK 9
- /**
- * def CBN_SELENDCANCEL
- * brief Notifies that the selection of a list item is ignored.
- *
- * The CBN_SELENDCANCEL notification code is sent when the user has selected a list
- * item but then selects another control or closes the dialog box.
- */
- #define CBN_SELENDCANCEL 10
- /** @} end of ctrl_combobox_ncs */
- /** @} end of ctrl_combobox */
- #endif /* _CTRL_COMBOBOX */
- /************************** Tool Bar control **********************************/
- #ifdef _CTRL_TOOLBAR
- /**
- * defgroup ctrl_toolbar ToolBar control
- *
- * note The argument a dwAddData of a CreateWindowEx function should specify
- * the height and the width of item on toolbar.
- * note This control is reserved only for compatibility, new applications
- * should use the new tool bar control instead (NewToolBar).
- *
- * code
- * int item_height = 16;
- * int item_width = 16;
- *
- * CreateWindowEx (CTRL_TOOLBAR, ..., MAKELONG (item_height, item_width));
- * endcode
- *
- * sa ctrl_newtoolbar
- *
- * @{
- */
- /**
- * def CTRL_TOOLBAR
- * brief The class name of toolbar control.
- */
- #define CTRL_TOOLBAR ("toolbar")
- /** Structure of the toolbar item info */
- typedef struct _TOOLBARITEMINFO
- {
- /** Reserved, do not use. */
- int insPos;
- /**
- * Identifier of the item. When the user clicked the item, this control
- * will send a notification message to the parent window
- * with the notification code to be equal to this identifier.
- */
- int id;
- /** Path of the bitmap for normal state of the item */
- char NBmpPath[MAX_PATH+10];
- /** Path of the bitmap for hilighted state of the item */
- char HBmpPath[MAX_PATH+10];
- /** Path of the bitmap for down state of the item */
- char DBmpPath[MAX_PATH+10];
- /** Additional data of the item */
- DWORD dwAddData;
- } TOOLBARITEMINFO;
- /**
- * var typedef TOOLBARITEMINFO* PTOOLBARITEMINFO;
- * brief Data type of the pointer to a TOOLBARITEMINFO.
- */
- typedef TOOLBARITEMINFO* PTOOLBARITEMINFO;
- /**
- * defgroup ctrl_toolbar_msgs Messages of toolbar control
- *
- * @{
- */
- /**
- * def TBM_ADDITEM
- * brief Adds an item to a toolbar.
- *
- * code
- * TBM_ADDITEM
- * TOOLBARITEMINFO *ptbii;
- *
- * wParam = 0;
- * lParam = (LPARAM)ptbii;
- * endcode
- *
- * param ptbii Pointer to the data storing the toolbar item info.
- */
- #define TBM_ADDITEM 0xFE00
- #define TBM_MSGMAX 0xFE10
- /** @} end of ctrl_toolbar_msgs */
- /** @} end of ctrl_toolbar */
- #endif /* _CTRL_TOOLBAR */
- /************************** New Tool Bar control **********************************/
- #ifdef _CTRL_NEWTOOLBAR
- /**
- * defgroup ctrl_newtoolbar NewToolBar control
- *
- * note You should pass information of the control through
- * the argument a dwAddData of a CreateWindowEx function.
- *
- * code
- * NTBINFO ntb_info;
- *
- * CreateWindowEx (CTRL_TOOLBAR, ..., (DWORD) &ntb_info);
- * endcode
- *
- * sa NTBINFO
- *
- * @{
- */
- /**
- * def CTRL_NEWTOOLBAR
- * brief The class name of newtoolbar control.
- */
- #define CTRL_NEWTOOLBAR ("newtoolbar")
- /** Structure of the newtoolbar control information */
- typedef struct _NTBINFO
- {
- /** Images for displaying tool bar item. */
- PBITMAP image;
- /** Number of bitmap cells in the image. */
- int nr_cells;
- /**
- * Number of cell columns in the image.
- * It should be one of the following values:
- * - 0, 4n
- * Four rows, the cells have normal, highlight, pushed, and disabled states.
- * - 1n
- * The cells have only normal state.
- * - 2n
- * The cells have normal and highlight states.
- * - 3n
- * The cells have normal, highlight, and pushed states.
- */
- int nr_cols;
- /**
- * Width of bitmap cell. If w_cell is zero, it will be
- * equal to (width_of_image / nr_cols).
- */
- int w_cell;
- /**
- * Height of bitmap cell. If h_cell is zero, it will be
- * equal to (height_of_image / nr_cells).
- */
- int h_cell;
- } NTBINFO;
- /**
- * var typedef void (* HOTSPOTPROC)(HWND hwnd, int id, const RECT* cell, int x, int y)
- * brief Type of the hotspot-clicked callback procedure.
- *
- * param hwnd The handle to the control.
- * param id The identifier of the button in the NewToolBar control.
- * param cell The rectangle of the button in screen coordinates.
- * param x The x-coordinate of the mouse down point.
- * param y THe y-coordinate of the mouse down point.
- */
- typedef void (* HOTSPOTPROC)(HWND hwnd, int id, const RECT* cell, int x, int y);
- #define NTB_TEXT_LEN 15
- #define NTB_TIP_LEN 255
- #define NTBIF_PUSHBUTTON 0x0001
- #define NTBIF_HOTSPOTBUTTON 0x0002
- #define NTBIF_SEPARATOR 0x0003
- #define NTBIF_CHECKBUTTON 0x0005
- #define NTBIF_NEWLINE 0x0008
- #define NTBIF_TYPEMASK 0x000F
- #define NTBIF_DISABLED 0x0010
- #define NTBIF_CHECKED 0x0020
- #define MTB_WHICH_FLAGS 0x0001
- #define MTB_WHICH_ID 0x0002
- #define MTB_WHICH_TEXT 0x0004
- #define MTB_WHICH_TIP 0x0008
- #define MTB_WHICH_CELL 0x0010
- #define MTB_WHICH_HOTSPOT 0x0020
- #define MTB_WHICH_ADDDATA 0x0040
- /** Structure of the new toolbar item info */
- typedef struct _NTBITEMINFO
- {
- /**
- * Which fields are valid when sets/retrives the item information
- * (ignored when add item). It can be OR'd with the following values:
- *
- * - MTB_WHICH_FLAGSn The flags is valid.
- * - MTB_WHICH_IDn The identifier is valid.
- * - MTB_WHICH_TEXTn The text is valid.
- * - MTB_WHICH_TIPn The tip text is valid.
- * - MTB_WHICH_CELLn The bitmap cell index is valid.
- * - MTB_WHICH_HOTSPOTn The hotspot rect is valid.
- * - MTB_WHICH_ADDDATAn The additional data is valid.
- */
- DWORD which;
- /**
- * Flags of the item. It can be OR'd with the following values:
- *
- * - NTBIF_PUSHBUTTONn The item is a normal push button.
- * - NTBIF_CHECKBUTTONn The item is a normal check button.
- * - NTBIF_NEWLINEn The item is a newline tag.
- * - NTBIF_HOTSPOTBUTTONn The item is a menu button with hotspot.
- * - NTBIF_SEPARATORn The item is a separator.
- * - NTBIF_DISABLEDn The item is disabled.
- */
- DWORD flags;
- /**
- * Identifier of the item. When the user clicked the item, this control
- * will send a notification message to the parent window
- * with the notification code to be equal to this identifier.
- */
- int id;
- /**
- * Text of the item. This text will be displayed under the bitmap
- * if the control have NTBS_WITHTEXT style.
- */
- char* text;
- /** Tooltip of the item, not used, reserved. */
- char* tip;
- /** Index of bitmap cell. */
- int bmp_cell;
- /** Hotpot-clicked callback procedure for menubutton. */
- HOTSPOTPROC hotspot_proc;
- /** Rectangle region of hotspot in the cell. */
- RECT rc_hotspot;
- /** Additional data of the item */
- DWORD add_data;
- } NTBITEMINFO;
- /**
- * var PNTBITEMINFO
- * brief Data type of pointer to a NTBITEMINFO;
- */
- typedef NTBITEMINFO* PNTBITEMINFO;
- /**
- * defgroup ctrl_newtoolbar_styles Styles of NewToolBar control
- * @{
- */
- /**
- * def NTBS_WITHTEXT
- * brief Displays text with the item bitmap.
- */
- #define NTBS_WITHTEXT 0x000000001L
- /**
- * def NTBS_TEXTRIGHT
- * brief Displays text at the right side of the item bitmap.
- */
- #define NTBS_TEXTRIGHT 0x000000002L
- /**
- * def NTBS_DRAWSTATES
- * brief Draws the button states with 3D frame, and does not
- * use the highlight, pushed and disabled bitmap cell.
- */
- #define NTBS_DRAWSTATES 0x000000004L
- /**
- * def NTBS_DRAWSEPARATOR
- * brief Draws the separator bar.
- */
- #define NTBS_DRAWSEPARATOR 0x000000008L
- /**
- * def NTBS_HORIZONTAL
- * brief The NewToolbar will be displayed horizontally.
- */
- #define NTBS_HORIZONTAL 0x00000000L
- /**
- * def NTBS_VERTICAL
- * brief The NewToolbar will be displayed vertically.
- */
- #define NTBS_VERTICAL 0x00000010L
- /**
- *
- * def NTBS_MULTLINE
- * brief The Newtoolbar item will be displayed in several lines.
- * In this style , your should define the toolbar RECT in CreateWindwEx.
- */
- #define NTBS_MULTLINE 0x00000020L
- /** @} end of ctrl_newtoolbar_styles */
- /**
- * defgroup ctrl_newtoolbar_msgs Messages of NewToolBar control
- * @{
- */
- #define NTB_OKAY 0
- #define NTB_ERR (-1)
- #define NTB_ERR_SPACE (-2)
- #define NTB_ERR_DUPID (-3)
- /**
- * def NTBM_ADDITEM
- * brief Adds an item to a newtoolbar.
- *
- * code
- * TBM_ADDITEM
- * NTBITEMINFO *ntbii;
- *
- * wParam = 0;
- * lParam = (LPARAM)ntbii;
- * endcode
- *
- * param ntbii Pointer to the data storing the newtoobar item info.
- *
- * return NTB_OKAY on success, else one of the following values:
- * - NTB_ERR_SPACEn No enongh space to allocate memory for new item.
- * - NTB_ERR_DUPIDn Duplicated identifier with an existed item.
- */
- #define NTBM_ADDITEM 0xFE00
- /**
- * def NTBM_GETITEM
- * brief Retrives the information of an item in a newtoolbar control.
- *
- * code
- * TBM_GETITEM
- * int id;
- * NTBITEMINFO *ntbii;
- *
- * wParam = id;
- * lParam = (LPARAM)ntbii;
- * endcode
- *
- * param id The identifier of the item.
- * param ntbii Pointer to the data storing the newtoobar item info.
- *
- * return NTB_OKAY on success, else NTB_ERR.
- */
- #define NTBM_GETITEM 0xFE01
- /**
- * def NTBM_SETITEM
- * brief Sets the information of an item in a newtoolbar control.
- *
- * code
- * TBM_SETITEM
- * int id;
- * NTBITEMINFO ntbii;
- *
- * wParam = id;
- * lParam = (LPARAM)&ntbii;
- * endcode
- *
- * param id The identifier of the item.
- * param ntbii The structure for storing the newtoobar item info.
- *
- * return NTB_OKAY on success, else NTB_ERR.
- */
- #define NTBM_SETITEM 0xFE02
- /**
- * def NTBM_ENABLEITEM
- * brief Enables/Disables an item in a newtoolbar control.
- *
- * code
- * NTBM_ENABLEITEM
- * int id;
- * BOOL enable;
- *
- * wParam = id;
- * lParam = enable;
- * endcode
- *
- * param id The identifier of the item.
- * param enable True to enable item; false to disable item.
- *
- * return NTB_OKAY on success, else NTB_ERR.
- */
- #define NTBM_ENABLEITEM 0xFE03
- /**
- * def NTBM_SETBITMAP
- * brief Sets the bitmap of a newtoolbar control.
- *
- * code
- * NTBM_SETBITMAP
- * NTBINFO ntbi;
- *
- * wParam = 0;
- * lParam = (LPARAM)&ntbi;
- * endcode
- *
- * param ntbi The structure for storing the newtoobar info.
- *
- * return NTB_OKAY on success, else NTB_ERR.
- */
- #define NTBM_SETBITMAP 0xFE04
- #define NTBM_MSGMAX 0xFE10
- /** @} end of ctrl_newtoolbar_msgs */
- /** @} end of ctrl_newtoolbar */
- #endif /* _CTRL_NEWTOOLBAR */
- /************************** Menu Button control ********************************/
- #ifdef _CTRL_MENUBUTTON
- /**
- * defgroup ctrl_menubutton MenuButton control
- * @{
- */
- /**
- * def CTRL_MENUBTN
- * brief The class name of menubutton control.
- */
- #define CTRL_MENUBTN ("menubutton")
- /**
- * def CTRL_MENUBUTTON
- * brief The class name of menubutton control.
- */
- #define CTRL_MENUBUTTON ("menubutton")
- /* Menu Button return value */
- #define MB_OKAY 0
- #define MB_ERR -1
- #define MB_INV_ITEM -2
- #define MB_ERR_SPACE -3
- /* struct used by parent to add/retrive item */
- #define MB_WHICH_TEXT 0x01
- #define MB_WHICH_BMP 0x02
- #define MB_WHICH_ATTDATA 0x04
- /** Structure of the menubutton item */
- typedef struct _MENUBUTTONITEM
- {
- /**
- * Which fields are valid when sets/retrives the item information
- * (ignored when add item). It can be OR'd with the following values:
- *
- * - MB_WHICH_TEXT The a text field is valid.
- * - MB_WHICH_BMP The a bmp field is valid.
- * - MB_WHICH_ATTDATA The a data field is valid.
- */
- DWORD which;
- /** Item string */
- const char* text;
- /** Item bitmap */
- PBITMAP bmp;
- /** Attached data */
- DWORD data;
- } MENUBUTTONITEM;
- /**
- * var typedef MENUBUTTONITEM* PMENUBUTTONITEM;
- * brief Data type of the pointer to a MENUBUTTONITEM.
- */
- typedef MENUBUTTONITEM* PMENUBUTTONITEM;
- /**
- * defgroup ctrl_menubutton_styles Styles of menubutton control
- * @{
- */
- /**
- * def MBS_SORT
- * brief If this bit is set, the items listed in the control
- * are displayed in a specified order.
- */
- #define MBS_SORT 0x0001
- /**
- * def MBS_LEFTARROW
- * brief The menu pull-down arrow will be display at the left of the text.
- */
- #define MBS_LEFTARROW 0x0002
- /**
- * def MBS_NOBUTTON
- * brief The control have not push button.
- */
- #define MBS_NOBUTTON 0x0004
- /**
- * def MBS_ALIGNLEFT
- * brief The text on menubutton is left-align (default).
- */
- #define MBS_ALIGNLEFT 0x0000
- /**
- * def MBS_ALIGNRIGHT
- * brief The text on menubutton is right-align.
- */
- #define MBS_ALIGNRIGHT 0x0010
- /**
- * def MBS_ALIGNCENTER
- * brief The text on menubutton is center-align.
- */
- #define MBS_ALIGNCENTER 0x0020
- #define MBS_ALIGNMASK 0x00F0
- /** @} end of ctrl_menubutton_styles */
- /**
- * defgroup ctrl_menubutton_msgs Messages of menubutton control
- * @{
- */
- /**
- * def MBM_ADDITEM
- * brief Sends to the control to add an item to the menu list.
- *
- * code
- * MBM_ADDITEM
- * int pos;
- * MENUBUTTONITEM newitem;
- *
- * wParam = (WPARAM)pos;
- * lParam = (LPARAM)&newitem;
- * endcode
- *
- * param pos The position at which to add the item. If the control
- * was created with the style of a MBS_SORT, this parameter
- * will be ignored. If this parameter is less than 0,
- * the new item will be append to the tail of the menu list.
- * param newitem Pointer to the menubutton item info structure.
- *
- * return The position at which the item has been added, i.e.,
- * the index of the added item if success. Otherwise,
- * the following error code will be returned:
- *
- * - MB_ERR_SPACEn No memory can be allocated for new item.
- */
- #define MBM_ADDITEM 0xF200
- /**
- * def MBM_DELITEM
- * brief Sends to the control to delete an item in the menu list.
- *
- * code
- * MBM_DELETEITEM
- * int delete;
- *
- * wParam = (WPARAM)delete;
- * lParam = 0;
- * endcode
- *
- * param delete The index of the item to be deleted.
- *
- * return MB_OKAY if success, else MB_INV_ITEM to indicate valid index.
- */
- #define MBM_DELITEM 0xF201
- /**
- * def MBM_RESETCTRL
- * brief Sends to the control to remove all items in the menu list.
- *
- * code
- * MBM_RESETCTRL
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Always be zero.
- */
- #define MBM_RESETCTRL 0xF202
- /**
- * def MBM_SETITEMDATA
- * brief Sends to the control to set the data of a specific item.
- *
- * code
- * MBM_SETITEMDATA
- * int index;
- * PMENUBUTTONITEM pmbi;
- *
- * wParam = (WPARAM)index;
- * lParam = (LPARAM)pmbi;
- * endcode
- *
- * param index The index of the item to be altered.
- * param pmbi Pointer to the MENUBUTTONITEM structure that stores the new
- * menubutton item data.
- *
- * return MB_OKAY if success, otherwise will be one of the following error codes:
- *
- * - MB_INV_ITEMn Indicate that the index you passed is valid.
- * - MB_ERR_SPACEn No memory can be allocated for new item data.
- * return
- */
- #define MBM_SETITEMDATA 0xF203
- /**
- * def MBM_GETITEMDATA
- * brief Sends to the control to retrive the data of a specific item.
- *
- * code
- * MBM_GETITEMDATA
- * int index;
- * PMENUBUTTONITEM pmbi;
- *
- * wParam = (WPARAM)index;
- * lParam = (LPARAM)pmbi;
- * endcode
- *
- * param index The index of the specific item.
- * param pmbi Pointer to the MENUBUTTONITEM structure for storing the
- * menubutton item data.
- *
- * return MB_OKAY if success, otherwise MB_INV_ITEM to indicate invalid index.
- */
- #define MBM_GETITEMDATA 0xF204
- /**
- * def MBM_GETCURITEM
- * brief Sends to get the index of the current selected item.
- *
- * code
- * MBM_GETCURITEM
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return The index of the current selected item. If there is no seleted
- * item, MB_INV_ITEM will be returned.
- */
- #define MBM_GETCURITEM 0xF206
- /**
- * def MBM_SETCURITEM
- * brief Sends to Set the the current selected item based on index.
- *
- * code
- * MBM_SETCURITEM
- * int new;
- *
- * wParam = (WPARAM)new;
- * lParam = 0;
- * endcode
- *
- * param new The index to be the current item.
- *
- * return The index of the old selected item.
- */
- #define MBM_SETCURITEM 0xF207
- /**
- * def MBM_SETSTRCMPFUNC
- * brief Sets the STRCMP function used to sort items.
- *
- * An application sends a MBM_SETSTRCMPFUNC message to set a
- * new STRCMP function to sort items in the menubutton.
- *
- * Note that you should send this message before adding
- * any item to the menubutton control.
- *
- * code
- * static int my_strcmp (const char* s1, const char* s2, size_t n)
- * {
- * ...
- * return 0;
- * }
- *
- * MBM_SETSTRCMPFUNC
- *
- * wParam = 0;
- * lParam = (LPARAM) my_strcmp;
- * endcode
- *
- * param my_strcmp Your own function to compare two strings.
- *
- * return One of the following values:
- * - MB_OKAYn Success
- * - MB_ERRn Not an empty menubutton
- */
- #define MBM_SETSTRCMPFUNC 0xF208
- #define MBM_MSGMAX 0xF210
- /** @} end of ctrl_menubutton_msgs */
- /**
- * defgroup ctrl_menubutton_ncs Notification codes of menubutton control
- * @{
- */
- /**
- * def MBN_ERRSPACE
- * brief Sends when memory space error occures.
- */
- #define MBN_ERRSPACE 255
- /**
- * def MBN_CHANGED
- * brief Sends when selected item changes.
- */
- #define MBN_CHANGED 1
- /**
- * def MBN_SELECTED
- * brief Sends when an item is selected.
- */
- #define MBN_SELECTED 2
- /**
- * def MBN_STARTMENU
- * brief Sends when starting tracking popup menu.
- */
- #define MBN_STARTMENU 4
- /**
- * def MBN_ENDMENU
- * brief Sends when ending tracking popup menu.
- */
- #define MBN_ENDMENU 5
- /**
- * def MBN_CLICKED
- * brief Sends when the user clicked the menubutton but not active the menu.
- */
- #define MBN_CLICKED 6
- /** @} end of ctrl_menubutton_ncs */
- /** @} end of ctrl_menubutton */
- #endif /* _CTRL_MENUBUTTON */
- /************************** Scroll Bar Control *********************************/
- #ifdef _CTRL_SCROLLBAR
- /**
- * defgroup ctrl_scrollbar ScrollBar control
- *
- * note The scrollbar is not implemented as a control in current version.
- * @{
- */
- /**
- * def CTRL_SCROLLBAR
- * brief The class name of scrollbar control.
- */
- #define CTRL_SCROLLBAR ("scrollbar")
- /**
- * defgroup ctrl_scrollbar_msgs Messages of scrollbar control
- * @{
- */
- #define SBM_SETPOS 0xF0E0
- #define SBM_GETPOS 0xF0E1
- #define SBM_SETRANGE 0xF0E2
- #define SBM_SETRANGEREDRAW 0xF0E6
- #define SBM_GETRANGE 0xF0E3
- #define SBM_ENABLE_ARROWS 0xF0E4
- #define SBM_SETSCROLLINFO 0xF0E9
- #define SBM_GETSCROLLINFO 0xF0EA
- #define SBM_MSGMAX 0xF0F0
- /** @} end of ctrl_scrollbar_msgs */
- /** @} end of ctrl_scrollbar */
- #endif /* _CTRL_SCROLLBAR */
- /************************** TrackBar Control ***********************************/
- #ifdef _CTRL_TRACKBAR
- /**
- * defgroup ctrl_trackbar TrackBar control
- * @{
- */
- /**
- * def CTRL_TRACKBAR
- * brief The class name of trackbar control.
- */
- #define CTRL_TRACKBAR ("trackbar")
- /**
- * def TBLEN_TIP
- * brief The maximum length of the trackbar tip string.
- */
- #define TBLEN_TIP 31
- /**
- * defgroup ctrl_trackbar_styles Styles of trackbar control
- * @{
- */
- /**
- * def TBS_NOTIFY
- * brief Causes the trackbar to notify the parent window with a notification message
- * when the user clicks or doubleclicks the trackbar.
- */
- #define TBS_NOTIFY 0x0001L
- /**
- * def TBS_VERTICAL
- * brief The trackbar control will be oriented vertically.
- */
- #define TBS_VERTICAL 0x0002L
- /**
- * def TBS_BORDER
- * brief The trackbar control will have border.
- */
- #define TBS_BORDER 0x0004L
- /**
- * def TBS_TIP
- * brief The trackbar control will display tip string above the control.
- */
- #define TBS_TIP 0x0008L
- /**
- * def TBS_NOTICK
- * brief The trackbar control will not display tick line beside the control.
- */
- #define TBS_NOTICK 0x0010L
- /* internally used style */
- #define TBS_FOCUS 0x1000L
- /** @} end of ctrl_trackbar_styles */
- /**
- * defgroup ctrl_trackbar_msgs Messages of trackbar control
- * @{
- */
- /**
- * def TBM_SETRANGE
- * brief Sets the range of minimum and maximum logical positions for the
- * slider in a trackbar.
- *
- * code
- * TBM_SETRANGE
- * int min;
- * int max;
- *
- * wParam = (WPARAM)min;
- * lParam = (LPARAM)max;
- * endcode
- *
- * param min Minimum position for the slider.
- * param max Maximum position for the slider.
- *
- * return Zero on success; otherwise -1.
- */
- #define TBM_SETRANGE 0xF090
- /**
- * def TBM_GETMIN
- * brief Gets the minimum logical position for the slider.
- *
- * code
- * TBM_GETMIN
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return The minimum logical position for the slider.
- */
- #define TBM_GETMIN 0xF091
- /**
- * def TBM_SETPOS
- * brief Sets the current logical position of the slider.
- *
- * code
- * TBM_SETPOS
- * int pos;
- *
- * wParam = (WPARAM)pos;
- * lParam = 0;
- * endcode
- *
- * param pos New logical position of the slider.
- *
- * return Always be zero.
- */
- #define TBM_SETPOS 0xF092
- /**
- * def TBM_GETPOS
- * brief Gets the current logical position of the slider.
- *
- * code
- * TBM_GETPOS
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return The current logical position of the slider.
- */
- #define TBM_GETPOS 0xF093
- /**
- * def TBM_SETLINESIZE
- * brief Sets the number of logical positions moved in response to keyboard
- * input from the arrow keys.
- *
- * Sets the number of logical positions the trackbar's slider moves in response
- * to keyboard input from the arrow keys. The logical positions are the integer
- * increments in the trackbar's range of minimum to maximum slider positions.
- *
- * code
- * TBM_SETLINESIZE
- * int linesize;
- *
- * wParam = (WPARAM)linesize;
- * lParam = 0;
- * endcode
- *
- * param linesize New line size.
- *
- * return Zero on success; otherwise -1.
- */
- #define TBM_SETLINESIZE 0xF094
- /**
- * def TBM_GETLINESIZE
- * brief Gets the number of logical positions moved in response to keyboard
- * input from the arrow keys.
- *
- * Gets the number of logical positions the trackbar's slider moves in response
- * to keyboard input from the arrow keys. The logical positions are the integer
- * increments in the trackbar's range of minimum to maximum slider positions.
- *
- * code
- * TBM_GETLINESIZE
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return The current line size.
- */
- #define TBM_GETLINESIZE 0xF095
- /**
- * def TBM_SETPAGESIZE
- * brief Sets the number of logical positions moved in response to keyboard
- * input from page keys..
- *
- * Sets the number of logical positions the trackbar's slider moves in response
- * to keyboard input form page keys, such as PAGE DOWN or PAGE UP keys. The
- * logical positions are the integer increments in the trackbar's range of
- * minimum to maximum slider positions.
- *
- * code
- * TBM_SETPAGESIZE
- * int pagesize;
- *
- * wParam = (WPARAM)pagesize;
- * lParam = 0;
- * endcode
- *
- * param pagesize New page size.
- *
- * return Zero on success; otherwise -1.
- */
- #define TBM_SETPAGESIZE 0xF096
- /**
- * def TBM_GETPAGESIZE
- * brief Gets the number of logical positions moved in response to keyboard
- * input from page keys..
- *
- * Gets the number of logical positions the trackbar's slider moves in response
- * to keyboard input form page keys, such as PAGE DOWN or PAGE UP keys. The
- * logical positions are the integer increments in the trackbar's range of
- * minimum to maximum slider positions.
- *
- * code
- * TBM_GETPAGESIZE
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return The current page size.
- */
- #define TBM_GETPAGESIZE 0xF097
- /**
- * def TBM_SETTIP
- * brief Sets the start and end tip strings.
- *
- * code
- * TBM_SETTIP
- * char* starttip;
- * char* endtip;
- *
- * wParam = (WPARAM)starttip;
- * lParam = (LPARAM)endtip;
- * endcode
- *
- * param starttip New start tip string.
- * param endtip New end tip tip string.
- *
- * return Always be zero.
- */
- #define TBM_SETTIP 0xF098
- /**
- * def TBM_GETTIP
- * brief Gets the start and end tip strings.
- *
- * code
- * TBM_GETTIP
- * char starttip [TBLEN_TIP + 1];
- * char endtip [TBLEN_TIP + 1];
- *
- * wParam = (WPARAM)starttip;
- * lParam = (LPARAM)endtip;
- * endcode
- *
- * param starttip Buffer receives the start tip string. It should
- * be length enough to save (TBLEN_TIP + 1) characters.
- * param endtip Buffer receives the end tip string. It should
- * be length enough to save (TBLEN_TIP + 1) characters.
- *
- * return Always be zero.
- */
- #define TBM_GETTIP 0xF09A
- /**
- * def TBM_SETTICKFREQ
- * brief Sets the interval frequency for tick marks in a trackbar.
- *
- * code
- * TBM_SETTICKFREQ
- * int tickfreq;
- *
- * wParam = (WPARAM)tickfreq;
- * lParam = 0;
- * endcode
- *
- * param tickfreq New interval frequency for tick marks in a trackbar;
- *
- * return Zero on success; otherwise -1.
- */
- #define TBM_SETTICKFREQ 0xF09B
- /**
- * def TBM_GETTICKFREQ
- * brief Gets the interval frequency for tick marks in a trackbar.
- *
- * code
- * TBM_GETTICKFREQ
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return The current interval frequency for tick marks in a trackbar;
- */
- #define TBM_GETTICKFREQ 0xF09C
- /**
- * def TBM_SETMIN
- * brief Sets the minimum logical position for the slider in a trackbar.
- *
- * code
- * TBM_SETMIN
- * int min;
- *
- * wParam = (WPARAM)min;
- * lParam = 0;
- * endcode
- *
- * param min The new minimum logical position for the slider in a trackbar.
- *
- * return Zero on success; otherwise -1.
- */
- #define TBM_SETMIN 0xF09D
- /**
- * def TBM_SETMAX
- * brief Sets the maximum logical position for the slider in a trackbar.
- *
- * code
- * TBM_SETMAX
- * int max;
- *
- * wParam = (WPARAM)max;
- * lParam = 0;
- * endcode
- *
- * param min The new maximum logical position for the slider in a trackbar.
- *
- * return Zero on success; otherwise -1.
- */
- #define TBM_SETMAX 0xF09E
- /**
- * def TBM_GETMAX
- * brief Gets the maximum logical position for the slider in a trackbar.
- *
- * code
- * TBM_GETMAX
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return The current maximum logical position for the slider in a trackbar.
- */
- #define TBM_GETMAX 0xF09F
- #define TBR_MSGMAX 0xF010
- /** @} end of ctrl_trackbar_msgs */
- /**
- * defgroup ctrl_trackbar_ncs Notification codes of trackbar control
- * @{
- */
- /**
- * def TBN_REACHMIN
- * brief Notifies that the slider has reached the minimum position.
- */
- #define TBN_REACHMIN 1
- /**
- * def TBN_REACHMAX
- * brief Notifies that the slider has reached the maximum position.
- */
- #define TBN_REACHMAX 2
- /**
- * def TBN_CHANGE
- * brief Notifies that the position of the slider has changed.
- */
- #define TBN_CHANGE 3
- /**
- * def TBN_STARTDRAG
- * brief Notifies that the user start to drag the slider.
- */
- #define TBN_STARTDRAG 4
- /**
- * def TBN_STOPDRAG
- * brief Notifies that the user stop to drag the slider.
- */
- #define TBN_STOPDRAG 5
- /** @} end of ctrl_trackbar_ncs */
- /** @} end of ctrl_trackbar */
- #endif /* _CTRL_TRACKBAR */
- /************************** ScrollView Control ***********************************/
- #ifdef _CTRL_SCROLLVIEW
- /**
- * defgroup ctrl_scrollview ScrollView control
- * @{
- *
- * Scrollview control is a scrollable window, which has a visible area and
- * normally a larger content area, user can browse content area using scrollbar.
- * Contents of the content area is totally user-defined, you can add controls in it,
- * add customed listed items, or anything you want.
- *
- * In fact, you can build a control needing scrolled window support on scrollview.
- */
- /**
- * def CTRL_SCROLLVIEW
- * brief The class name of scrollview control, uses this name to create a scrollable
- * window that consists of items.
- *
- */
- #define CTRL_SCROLLVIEW ("scrollview")
- /**
- * def CTRL_SCROLLWND
- * brief The class name of scrollwnd control, uses this name to create a scrollable
- * window to which you can add controls.
- *
- */
- #define CTRL_SCROLLWND ("scrollwnd")
- /** default container window procedure */
- int GUIAPI DefaultContainerProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam);
- /** scrollview item object, use this handle to access a scrollview item */
- typedef GHANDLE HSVITEM;
- /**
- * Structure which defines a container.
- */
- typedef struct _CONTAINERINFO
- {
- #if 0
- DWORD dwStyle; /** style of the container */
- DWORD dwExStyle; /** extended style of the container */
- int x, y, w, h; /** position and size of the container */
- #endif
- WNDPROC user_proc; /** user-defined window procedure of the container */
- int controlnr; /** number of controls */
- PCTRLDATA controls; /** pointer to control array */
- DWORD dwAddData; /** additional data */
- } CONTAINERINFO;
- typedef CONTAINERINFO* PCONTAINERINFO;
- /**
- * fn DWORD scrollview_get_item_adddata (HSVITEM hsvi)
- * brief use this to get additional data from scrollview item
- */
- DWORD scrollview_get_item_adddata (HSVITEM hsvi);
- /**
- * fn int scrollview_get_item_index (HWND hWnd, HSVITEM hsvi);
- * brief to get item index
- */
- int scrollview_get_item_index (HWND hWnd, HSVITEM hsvi);
- /**
- * fn int scrollview_is_item_hilight (HWND hWnd, HSVITEM hsvi)
- * brief to decide whether an item is the current hilighted item
- */
- BOOL scrollview_is_item_hilight (HWND hWnd, HSVITEM hsvi);
- /**
- * fn int scrollview_is_item_selected (HSVITEM hsvi)
- * brief to decide whether an item is a selected
- */
- BOOL scrollview_is_item_selected (HSVITEM hsvi);
- /**
- * fn int scrollview_set_item_height (HWND hWnd, HSVITEM hsvi, int height)
- * brief Sets the height of an item
- */
- int scrollview_set_item_height (HWND hWnd, HSVITEM hsvi, int height);
- /**
- * var typedef void (* SVITEM_INITFUNC)(HWND hWnd, HSVITEM hsvi)
- * brief Type of the scrollview item initialization callback procedure.
- *
- * param hWnd handle of the scrollview control .
- * param hsvi scrollview item handle.
- *
- * return Zero on success; otherwise -1.
- */
- typedef int (*SVITEM_INITFUNC) (HWND hWnd, HSVITEM hsvi);
- /**
- * var typedef void (* SVITEM_DESTROYFUNC)(HWND hWnd, HSVITEM hsvi)
- * brief Type of the scrollview item destroy callback procedure.
- *
- * param hWnd handle of the scrollview control .
- * param hsvi scrollview item handle.
- */
- typedef void (*SVITEM_DESTROYFUNC) (HWND hWnd, HSVITEM hsvi);
- /**
- * var typedef void (*SVITEM_DRAWFUNC)(HWND hWnd, HSVITEM hsvi, HDC hdc, RECT *rcDraw)
- * brief Type of the scrollview item drawing callback procedure.
- *
- * param hWnd handle of the scrollview control.
- * param hsvi scrollview item handle.
- * param hdc drawing device context.
- * param rcDraw drawing rect area.
- */
- typedef void (*SVITEM_DRAWFUNC) (HWND hWnd, HSVITEM hsvi, HDC hdc, RECT *rcDraw);
- /**
- * var typedef int (*SVITEM_CMP) (HSVITEM hsvi1, HSVITEM hsvi2)
- * brief Type of the scrollview item compare function
- */
- typedef int (*SVITEM_CMP) (HSVITEM hsvi1, HSVITEM hsvi2);
- /** structure of item operations */
- typedef struct _svitem_operations
- {
- SVITEM_INITFUNC initItem; /** called when an scrollview item is created */
- SVITEM_DESTROYFUNC destroyItem; /** called when an item is destroied */
- SVITEM_DRAWFUNC drawItem; /** call this to draw an item */
- } SVITEMOPS;
- typedef SVITEMOPS* PSVITEMOPS;
- /** structure of the scrollview item info */
- typedef struct _SCROLLVIEWITEMINFO
- {
- int nItem; /** index of item */
- int nItemHeight; /** height of an item */
- DWORD addData; /** item additional data */
- } SVITEMINFO;
- typedef SVITEMINFO* PSVITEMINFO;
- /**
- * defgroup ctrl_scrollview_styles Styles of scrollview control
- * @{
- */
- #define SVS_NOTIFY 0x0001L
- #define SVS_UPNOTIFY 0x0002L
- #define SVS_AUTOSORT 0x0004L
- #define SVS_LOOP 0x0008L
- /** @} end of ctrl_scrollview_styles */
- /**
- * defgroup ctrl_scrollview_msgs Messages of scrollview control
- * @{
- */
- /**
- * def SVM_ADDITEM
- * brief adds an item in the scrollview.
- *
- * code
- * SVM_ADDITEM
- * SVITEMINFO svii;
- * HSVITEM *phsvi;
- *
- * wParam = phsvi;
- * lParam = (LPARAM)&svii;
- * endcode
- *
- * param &svii pointer to a scrollview item information structure.
- * param phsvi pointer to a HSVITEM var, used to store the item handle
- * returned.
- *
- * return index of the scrollview item on success; otherwise -1.
- */
- #define SVM_ADDITEM 0xF300
- /**
- * def SVM_DELITEM
- * brief deletes an item from the scrollview.
- *
- * code
- * SVM_DELITEM
- * int nItem;
- * HSVITEM hsvi;
- *
- * wParam = (WPARAM)nItem;
- * lParam = (LPARAM)hsvi;
- * endcode
- *
- * param nItem scrollview item index to delete.
- * If hsvi is not zero, nItem will be ignored.
- * param hsvi scrollview item handle to delete.
- *
- * return Zero on success; otherwise -1.
- */
- #define SVM_DELITEM 0xF301
- /**
- * def SVM_SETITEMDRAW
- * brief sets the drawing operation of an item.
- *
- * scrollview item drawing function will be called when doing with MSG_PAINT message,
- * scrollview window should define this function if it want to draw an customed item.
- *
- * code
- * SVM_SETITEMDRAW
- * SVITEM_DRAWFUNC pfn;
- *
- * wParam = 0;
- * lParam = (LPARAM)pfn;
- * endcode
- *
- * param pfn scrollview item drawing function.
- *
- * return old drawing function pointer; otherwise 0.
- */
- #define SVM_SETITEMDRAW 0xF302
- /**
- * def SVM_ADDCTRLS
- * brief adds controls to the scrollview.
- *
- * code
- * SVM_ADDCTRLS
- * int itemNr;
- * PCTRLDATA pctrls;
- *
- * wParam = (WPARAM)itemNr;
- * lParam = (LPARAM)pctrls;
- * endcode
- *
- * param ctrlNr control number in the pctrls control array.
- * param pctrls points to a CTRLDATA array that defines controls.
- *
- * return Zero on success; otherwise -1.
- */
- #define SVM_ADDCTRLS 0xF303
- /**
- * def SVM_SETCONTWIDTH
- * brief sets the scrollview content area (scrollable area) width.
- *
- * scrollable area of a scrolled window is always larger than the visible area.
- *
- * code
- * SVM_SETCONTWIDTH
- * int cont_w;
- *
- * wParam = cont_w;
- * lParam = 0;
- * endcode
- *
- * param cont_w scrollview content width.
- *
- * return Zero on success; otherwise -1.
- */
- #define SVM_SETCONTWIDTH 0xF306
- /**
- * def SVM_SETCONTHEIGHT
- * brief sets the scrollview content area (scrollable area) height.
- *
- * scrollable area of a scrolled window is always larger than the visible area.
- *
- * code
- * SVM_SETCONTHEIGHT
- * int cont_h;
- *
- * wParam = cont_h;
- * lParam = 0;
- * endcode
- *
- * param cont_h scrollview content height.
- *
- * return Zero on success; otherwise -1.
- */
- #define SVM_SETCONTHEIGHT 0xF307
- /**
- * def SVM_GETCTRL
- * brief gets the control handle in the scrollview window by control id.
- *
- * code
- * SVM_GETCTRL
- * int id;
- *
- * wParam = id;
- * lParam = 0;
- * endcode
- *
- * param id control id.
- *
- * return control window handle on success; otherwise 0.
- */
- #define SVM_GETCTRL 0xF308
- /**
- * def SVM_RESETCONTENT
- * brief clears all the controls and the items added to the scrollview window.
- *
- * code
- * SVM_RESETCONTENT
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Zero on success; otherwise -1.
- */
- #define SVM_RESETCONTENT 0xF309
- /**
- * def SVM_SETITEMOPS
- * brief sets the item operations of the items in the scrollview.
- *
- * normally item operations should be set before adding items.
- *
- * code
- * SVM_SETITEMOPS
- * SVITEMOPS *iop;
- *
- * wParam = 0;
- * lParam = (LPARAM)iop;
- * endcode
- *
- * param iop points to a SVITEMOPS structure that defines item operations
- *
- * return Zero on success; otherwise -1.
- */
- #define SVM_SETITEMOPS 0xF30a
- /**
- * def SVM_GETMARGINS
- * brief Gets the margin values of the scrollview.
- *
- * Application should use a RECT structure to get left, top, right, and bottom margins.
- *
- * code
- * SVM_GETMARGINS
- * RECT rcMargin;
- *
- * wParam = 0;
- * lParam = (LPARAM)&rcMargin;
- * endcode
- *
- * param rcMargin a RECT for storing 4 margin values.
- *
- * return 0 on success.
- */
- #define SVM_GETMARGINS 0xF30b
- /**
- * def SVM_SETMARGINS
- * brief Sets the margin values of the scrollview.
- *
- * Application should use a RECT structure to give left, top, right, and bottom margins.
- * If you want to change a margin value, give a value large than zero, or else -1.
- *
- * code
- * SVM_SETMARGINS
- * RECT *rcMargin;
- *
- * wParam = 0;
- * lParam = (LPARAM)rcMargin;
- * endcode
- *
- * param rcMargin a RECT Containing 4 margin values.
- *
- * return 0 on success.
- */
- #define SVM_SETMARGINS 0xF311
- /**
- * def SVM_GETLEFTMARGIN
- * brief Gets the left margin value of the scrollview.
- *
- * code
- * SVM_GETLEFTMARGIN
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Left margin value on success, otherwise -1.
- */
- #define SVM_GETLEFTMARGIN 0xF312
- /**
- * def SVM_GETTOPMARGIN
- * brief Gets the top margin value of the scrollview.
- *
- * code
- * SVM_GETTOPMARGIN
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Top margin value on success, otherwise -1.
- */
- #define SVM_GETTOPMARGIN 0xF313
- /**
- * def SVM_GETRIGHTMARGIN
- * brief Gets the right margin value of the scrollview.
- *
- * code
- * SVM_GETRIGHTMARGIN
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Right margin value on success, otherwise -1.
- */
- #define SVM_GETRIGHTMARGIN 0xF314
- /**
- * def SVM_GETBOTTOMMARGIN
- * brief Gets the bottom margin value of the scrollview.
- *
- * code
- * SVM_GETBOTTOMMARGIN
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Bottom margin value on success, otherwise -1.
- */
- #define SVM_GETBOTTOMMARGIN 0xF315
- /**
- * def SVM_GETVISIBLEWIDTH
- * brief Gets the width of the visible content area.
- *
- * code
- * SVM_GETVISIBLEWIDTH
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Width of the visible content area on success, otherwise -1.
- */
- #define SVM_GETVISIBLEWIDTH 0xF316
- /**
- * def SVM_GETVISIBLEHEIGHT
- * brief Gets the height of the visible content area.
- *
- * code
- * SVM_GETVISIBLEHEIGHT
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Height of the visible content area on success, otherwise -1.
- */
- #define SVM_GETVISIBLEHEIGHT 0xF317
- /**
- * def SVM_GETCONTWIDTH
- * brief Gets the width of the content area.
- *
- * code
- * SVM_GETCONTWIDTH
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Width of the content area on success, otherwise -1.
- */
- #define SVM_GETCONTWIDTH 0xF318
- /**
- * def SVM_GETCONTHEIGHT
- * brief Gets the height of the content area.
- *
- * code
- * SVM_GETCONTHEIGHT
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Height of the content area on success, otherwise -1.
- */
- #define SVM_GETCONTHEIGHT 0xF319
- /**
- * def SVM_SETCONTRANGE
- * brief Sets the width and height of the content area.
- *
- * If you want to change width and height, give a value large than zero.
- * If you give -1, this value will remain untouched.
- *
- * code
- * SVM_SETCONTRANGE
- * int cont_w, cont_h;
- *
- * wParam = cont_w;
- * lParam = cont_h;
- * endcode
- *
- * param cont_w Width of the content area.
- * param cont_h Height of the content area.
- *
- * return 0 on success, otherwise -1.
- */
- #define SVM_SETCONTRANGE 0xF31a
- /**
- * def SVM_GETCONTENTX
- * brief Gets the content x offset in the viewport.
- *
- * code
- * SVM_GETCONTENTX
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return content x coordinate in the viewport on success, otherwise -1.
- */
- #define SVM_GETCONTENTX 0xF31b
- /**
- * def SVM_GETCONTENTY
- * brief Gets the content y offset in the viewport.
- *
- * code
- * SVM_GETCONTENTY
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return content y coordinate in the viewport on success, otherwise -1.
- */
- #define SVM_GETCONTENTY 0xF31c
- /**
- * def SVM_SETCONTPOS
- * brief Gets the content offset position in the viewport.
- *
- * code
- * SVM_SETCONTPOS
- * int cont_x, cont_y;
- *
- * wParam = cont_x;
- * lParam = cont_y;
- * endcode
- *
- * param cont_x new content x offset
- * param cont_y new content y offset
- *
- * return 0 on success, otherwise -1.
- */
- #define SVM_SETCONTPOS 0xF31d
- /**
- * def SVM_GETCURSEL
- * brief Gets the index of the current hilighted scrollview item.
- *
- * An application sends an this message to a scrollview window to get the index of
- * the currently selected item, if there is one, in a single-selection scrollview.
- * For multiple-selection case, appliction send this message to a scrollview
- * to get the index of the current highlighted item.
- *
- * code
- * SVM_GETCURSEL
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return index of current hilighted item.
- */
- #define SVM_GETCURSEL 0xF31e
- /**
- * def SVM_SELECTITEM
- * brief Selects or unselects an item in the scrollview item.
- *
- * code
- * SVM_SELECTITEM
- * int nItem;
- *
- * wParam = nItem;
- * lParam = bSel;
- * endcode
- *
- * param nItem Index of the item to select or unselect.
- * param bSel To select or unselect.
- *
- * return 0 on success, otherwise -1.
- */
- #define SVM_SELECTITEM 0xF31f
- /**
- * def SVM_SHOWITEM
- * brief Makes an item visible in the scrollview item.
- *
- * code
- * SVM_SHOWITEM
- * int nItem;
- * HSVITEM hsvi;
- *
- * wParam = nItem;
- * lParam = hsvi;
- * endcode
- *
- * param nItem Item index. Be useful when hsvi is zero.
- * param hsvi Item handle.
- *
- * return 0 on success, otherwise -1.
- */
- #define SVM_SHOWITEM 0xF320
- /**
- * def SVM_CHOOSEITEM
- * brief Makes an item selected and visible in the scrollview item.
- *
- * code
- * SVM_CHOOSEITEM
- * int nItem;
- * HSVITEM hsvi;
- *
- * wParam = nItem;
- * lParam = hsvi;
- * endcode
- *
- * param nItem Item index. Be useful when hsvi is zero.
- * param hsvi Item handle.
- *
- * return 0 on success, otherwise -1.
- */
- #define SVM_CHOOSEITEM 0xF321
- /**
- * def SVM_SETCURSEL
- * brief Makes an item as the current hilighted item in the scrollview item.
- *
- * code
- * SVM_SETCURSEL
- * int nItem;
- * BOOL bVisible;
- *
- * wParam = nItem;
- * lParam = bVisible;
- * endcode
- *
- * param nitem Item index.
- * param bVisible If bVisible is TRUE, this item wille be made visible.
- *
- * return old hilighted item index on success, otherwise -1.
- */
- #define SVM_SETCURSEL 0xF322
- /**
- * def SVM_SETITEMINIT
- * brief Sets the init operation of the items in the scrollview.
- *
- * normally item operations should be set before adding items.
- * The initialization callback function will be called when adding an item.
- *
- * code
- * SVM_SETITEMINIT
- * SVITEM_INITFUNC *pfn;
- *
- * wParam = 0;
- * lParam = (LPARAM)pfn;
- * endcode
- *
- * param pfn item init operation function
- *
- * return old function on success; otherwise NULL.
- */
- #define SVM_SETITEMINIT 0xF323
- /**
- * def SVM_SETITEMDESTROY
- * brief Sets the destroy operation of the items in the scrollview.
- *
- * normally item operations should be set before adding items.
- * The destroy callback function will be called when deleting an item
- *
- * code
- * SVM_SETITEMDESTROY
- * SVITEM_DESTROYFUNC *pfn;
- *
- * wParam = 0;
- * lParam = (LPARAM)pfn;
- * endcode
- *
- * param pfn item destroy operation function
- *
- * return old function on success; otherwise NULL.
- */
- #define SVM_SETITEMDESTROY 0xF324
- /**
- * def SVM_SETITEMCMP
- * brief Sets the item compare function.
- *
- * code
- * SVM_SETITEMCMP
- * SVITEM_CMP *pfn;
- *
- * wParam = 0;
- * lParam = (LPARAM)pfn;
- * endcode
- *
- * param pfn new item compare function
- *
- * return old function on success; otherwise NULL.
- */
- #define SVM_SETITEMCMP 0xF327
- /**
- * def SVM_MAKEPOSVISIBLE
- * brief Makes a position in the content area visible.
- *
- * code
- * SVM_MAKEPOSVISIBLE
- * int pos_x, pos_y;
- *
- * wParam = pos_x;
- * lParam = pos_y;
- * endcode
- *
- * param pos_x x coordinate of the position to be made visible
- * param pos_y y coordinate of the position to be made visible
- */
- #define SVM_MAKEPOSVISIBLE 0xF328
- /**
- * def SVM_SETCONTAINERPROC
- * brief Sets the window procedure of the container window in the scrollview.
- *
- * code
- * SVM_SETCONTAINERPROC
- * WNDPROC pfn;
- *
- * wParam = 0;
- * lParam = (LPARAM)pfn;
- * endcode
- *
- * param pfn new container procedure function.
- *
- * return old container procedure.
- */
- #define SVM_SETCONTAINERPROC 0xF329
- /**
- * def SVM_GETFOCUSCHILD
- * brief Gets the focus control in the scrollview.
- *
- * code
- * SVM_GETFOCUSCHILD
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Handle of the focus control.
- */
- #define SVM_GETFOCUSCHILD 0xF32a
- /**
- * def SVM_GETHSCROLLVAL
- * brief Gets the horizontal scroll value.
- *
- * code
- * SVM_GETHSCROLLVAL
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Current horizontal scroll value.
- */
- #define SVM_GETHSCROLLVAL 0xF32b
- /**
- * def SVM_GETVSCROLLVAL
- * brief Gets the vertical scroll value.
- *
- * code
- * SVM_GETVSCROLLVAL
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Current vertical scroll value.
- */
- #define SVM_GETVSCROLLVAL 0xF32c
- /**
- * def SVM_GETHSCROLLPAGEVAL
- * brief Gets the horizontal page scroll value.
- *
- * code
- * SVM_GETHSCROLLPAGEVAL
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Current horizontal page scroll value.
- */
- #define SVM_GETHSCROLLPAGEVAL 0xF32d
- /**
- * def SVM_GETVSCROLLPAGEVAL
- * brief Gets the vertical page scroll value.
- *
- * code
- * SVM_GETVSCROLLPAGEVAL
- *
- * wParam = 0;
- * lParam = 0;
- * endcode
- *
- * return Current vertical page scroll value.
- */
- #define SVM_GETVSCROLLPAGEVAL 0xF32e
- /**
- * def SVM_SETSCROLLVAL
- * brief Sets the horizontal and vertical scroll value.
- *
- * code
- * SVM_SETSCROLLVAL
- * int hval, vval;
- *
- * wParam = hval;
- * lParam = vval;
- * endcode
- *
- * param hval new horizontal scroll value.
- * param vval new vertical scroll value.
- *
- * return zero.
- */
- #define SVM_SETSCROLLVAL 0xF32f
- /**
- * def SVM_SETSCROLLPAGEVAL
- * brief Sets the horizontal and vertical page value.
- *
- * code
- * SVM_SETSCROLLPAGEVAL
- * int hval, vval;
- *
- * wParam = hval;
- * lParam = vval;
- * endcode
- *
- * param hval new horizontal page value.
- * param vval new vertical page value.
- *
- * return zero.
- */
- #define SVM_SETSCROLLPAGEVAL 0xF330
- /**
- * def SVM_SORTITEMS
- * brief Sorts the items according to a specified comparision function.
- *
- * code
- * SVM_SORTITEMS
- * SVITEM_CMP pfn;
- *
- * lParam = pfn;
- * endcode
- *
- * param pfn Comparision function.
- *
- * return zero.
- */
- #define SVM_SORTITEMS 0xF331
- /**
- * def SVM_GETITEMCOUNT
- * brief Gets the total number of the items.
- *
- * return number of the items.
- */
- #define SVM_GETITEMCOUNT 0xF332
- /**
- * def SVM_GETITEMADDDATA
- * brief Gets the additional data of the item
- *
- * code
- * SVM_GETITEMADDDATA
- * int nItem;
- * HSVITEM hsvi;
- *
- * wParam = (WPARAM)nItem;
- * lParam = (LPARAM)hsvi;
- * endcode
- *
- * param nItem scrollview item index to access.
- * If hsvi is not zero, nItem will be ignored.
- * param hsvi scrollview item handle to access.
- *
- * return item additional data.
- */
- #define SVM_GETITEMADDDATA 0xF333
- /**
- * def SVM_SETITEMADDDATA
- * brief Sets the additional data of the item
- *
- * code
- * SVM_SETITEMADDDATA
- * int nitem;
- * int addData;
- *
- * wParam = nitem;
- * lParam = addData;
- * endcode
- *
- * param nitem item index.
- * param addData additional data
- *
- * return old item additional data.
- */
- #define SVM_SETITEMADDDATA 0xF334
- /**
- * def SVM_REFRESHITEM
- * brief refresh the item
- *
- * code
- * SVM_REFRESHITEM
- * int nitem;
- * HSVITEM hsvi;
- *
- * wParam = nitem;
- * lParam = hsvi;
- * endcode
- *
- * param nitem item index. If hsvi is not zero, nItem will be ignored.
- * param hsvi item handle.
- *
- * return 0.
- */
- #define SVM_REFRESHITEM 0xF335
- /**
- * def SVM_SETITEMHEIGHT
- * brief Sets the height of an item
- *
- * code
- * SVM_SETITEMHEIGHT
- * int nitem;
- * int height;
- *
- * wParam = nitem;
- * lParam = height;
- * endcode
- *
- * param nitem item index.
- * param height new height of the item
- *
- * return old item height.
- */
- #define SVM_SETITEMHEIGHT 0xF336
- /**
- * def SVM_GETFIRSTVISIBLEITEM
- * brief Gets the index of the first visible item
- *
- * code
- * SVM_GETFIRSTVISIBLEITEM
- *
- * return Item index.
- */
- #define SVM_GETFIRSTVISIBLEITEM 0xF337
- /** @} end of ctrl_scrollview_msgs */
- /**
- * defgroup ctrl_scrollview_ncs Notification codes of scrollview control
- * @{
- */
- /** indicates clicking on the item */
- #define SVN_CLICKED 1
- /** indicates the hilighted item changed */
- #define SVN_SELCHANGED 2
- /** @} end of ctrl_scrollview_ncs */
- /** @} end of ctrl_scrollview */
- #endif /* _CTRL_SCROLLVIEW */
- /** @} end of controls */
- /************************** TextEdit Control ***********************************/
- #ifdef _CTRL_TEXTEDIT
- /**
- * defgroup ctrl_textedit TextEdit control
- * @{
- */
- /**
- * def CTRL_TEXTEDIT
- * brief The class name of textedit control.
- */
- #define CTRL_TEXTEDIT ("textedit")
- /* text document/buffer object */
- typedef GHANDLE HTEXTDOC;
- /**
- * defgroup ctrl_textedit_styles Styles of textedit control
- * @{
- */
- #define TES_BASELINE ES_BASELINE
- #define TES_AUTOWRAP ES_AUTOWRAP
- #define TES_TITLE ES_TITLE
- /** @} end of ctrl_textedit_styles */
- /**
- * defgroup ctrl_textedit_msgs Messages of textedit control
- * @{
- */
- #define TEM_RESETCONTENT 0xF400
- #define TEM_ADDLINE 0xF401
- /** @} end of ctrl_textedit_msgs */
- /**
- * defgroup ctrl_textedit_ncs Notification codes of textedit control
- * @{
- */
- #define TEN_CLICK 1
- /** @} end of ctrl_textedit_ncs */
- /** @} end of ctrl_textedit */
- #endif /* _CTRL_TEXTEDIT */
- /** @} end of controls */
- #ifdef __cplusplus
- }
- #endif /* __cplusplus */
- #endif /* _MGUI_CONTROL_H */