MiniGUI API Reference (MiniGUI-Processes)  v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Macros
Messages of propertysheet control

Macros

#define PS_OKAY   0
 
#define PS_ERR   (-1)
 
#define PSM_GETACTIVEPAGE   0xF1C0L
 Gets the handle of current active page. More...
 
#define PSM_SETACTIVEINDEX   0xF1C2L
 Changes the active page by index. More...
 
#define PSM_GETPAGE   0xF1C3L
 Gets the handle of a page by index. More...
 
#define PSM_GETACTIVEINDEX   0xF1C4L
 Gets the index of the current active page. More...
 
#define PSM_GETPAGEINDEX   0xF1C5L
 Gets the index of a page by handle. More...
 
#define PSM_GETPAGECOUNT   0xF1C6L
 Gets the number of pages of the propsheet. More...
 
#define PSM_GETTITLELENGTH   0xF1C7L
 Gets the length of a page title. More...
 
#define PSM_GETTITLE   0xF1C8L
 Gets a page title. More...
 
#define PSM_SETTITLE   0xF1C9L
 Sets a page title. More...
 
#define PSM_ADDPAGE   0xF1D0L
 Adds a page to the propsheet. More...
 
#define PSM_REMOVEPAGE   0xF1D1L
 Removes a page from the propsheet. More...
 
#define PSM_SHEETCMD   0xF1D2L
 Sends a MSG_SHEETCMD message to all pages in the propsheet. More...
 

Detailed Description

Macro Definition Documentation

#define PS_ERR   (-1)

Propsheet return value

Definition at line 113 of file propsheet.h.

#define PS_OKAY   0

Propsheet return value

Definition at line 111 of file propsheet.h.

#define PSM_ADDPAGE   0xF1D0L

Adds a page to the propsheet.

Sends this message to add a page to the propsheet.

1 PSM_ADDPAGE
2 DLGTEMPLATE *dlg_tmpl;
3 WNDPROC proc;
4 
5 wParam = (WPARAM)dlg_tmpl;
6 lParam = (LPARAM)proc;
Parameters
hdlgThe handle of the page window to be added in the propsheet.
procThe window callback procedure of the page window. Note that the procedure should call DefaultPageProc function by default.
Returns
The index of the page added on success; PS_ERR on error.

Definition at line 312 of file propsheet.h.

#define PSM_GETACTIVEINDEX   0xF1C4L

Gets the index of the current active page.

Sends this message to retreive the index of the propsheet window's active page.

1 PSM_GETACTIVEINDEX
2 
3 wParam = 0;
4 lParam = 0;
Returns
The index number of the active page.

Definition at line 187 of file propsheet.h.

#define PSM_GETACTIVEPAGE   0xF1C0L

Gets the handle of current active page.

Sends this message to retreive the propsheet window's active page.

1 PSM_GETACTIVEPAGE
2 
3 wParam = 0;
4 lParam = 0;
Returns
The handle to the active page; HWND_INVALID if no such a page.

Definition at line 130 of file propsheet.h.

#define PSM_GETPAGE   0xF1C3L

Gets the handle of a page by index.

Sends this message to retreive the handle to a page by index.

1 PSM_GETPAGE
2 int index;
3 
4 wParam = (WPARAM)index;
5 lParam = 0;
Parameters
indexThe index of the page.
Returns
The handle to the page; HWND_INVALID if no such a page.

Definition at line 170 of file propsheet.h.

#define PSM_GETPAGECOUNT   0xF1C6L

Gets the number of pages of the propsheet.

Sends this message to retreive the number of pages currently in the propsheet.

1 PSM_GETPAGECOUNT
2 
3 wParam = 0;
4 lParam = 0;
Returns
The number of pages in the propsheet.

Definition at line 224 of file propsheet.h.

#define PSM_GETPAGEINDEX   0xF1C5L

Gets the index of a page by handle.

Sends this message to retreive the index to a page by handle.

1 PSM_GETPAGEINDEX
2 HWND hwnd;
3 
4 wParam = hwnd;
5 lParam = 0;
Parameters
hwndThe handle of the page.
Returns
The index of the page; PS_ERR if no such a page.

Definition at line 207 of file propsheet.h.

#define PSM_GETTITLE   0xF1C8L

Gets a page title.

Sends this message to retreive the title of a page.

1 PSM_GETTITLE
2 int index;
3 char *buffer;
4 
5 wParam = (WPARAM)index;
6 lParam = (LPARAM)buffer;
Parameters
indexThe index number of the page in the propsheet.
bufferThe buffer storing the title string.
Returns
PS_OKAY on success; PS_ERR if no such a page.

Definition at line 266 of file propsheet.h.

#define PSM_GETTITLELENGTH   0xF1C7L

Gets the length of a page title.

Sends this message to retreive the title length of a page.

1 PSM_GETTITLELENGTH
2 int index;
3 
4 wParam = (WPARAM)index;
5 lParam = 0;
Parameters
indexThe index number of the page in the propsheet.
Returns
The length of the page in the propsheet; PS_ERR if no such a page.

Definition at line 244 of file propsheet.h.

#define PSM_REMOVEPAGE   0xF1D1L

Removes a page from the propsheet.

Sends this message to remove a page from the propsheet and destroys the associated controls.

1 PSM_REMOVEPAGE
2 int index;
3 
4 wParam = (WPARAM)index;
5 lParam = 0;
Parameters
indexThe index number of the page to be removed from the propsheet.
Returns
If success, return PS_OKAY, otherwise PS_ERR.

Definition at line 333 of file propsheet.h.

#define PSM_SETACTIVEINDEX   0xF1C2L

Changes the active page by index.

Sends this message to change the propsheet window's active page.

1 PSM_SETACTIVEINDEX
2 int page;
3 
4 wParam = (WPARAM)page;
5 lParam = 0;
Parameters
pageIndex of the page to set.
Returns
PS_OKAY on success, otherwise PS_ERR.

Definition at line 150 of file propsheet.h.

#define PSM_SETTITLE   0xF1C9L

Sets a page title.

Sends this message to specify the title of a page.

1 PSM_SETTITLE
2 int index;
3 char *buffer;
4 
5 wParam = (WPARAM)index;
6 lParam = (LPARAM)buffer;
Parameters
indexThe index number of the page in the propsheet.
bufferThe string buffer storing the title.
Returns
PS_OKAY on success; PS_ERR if no such a page.

Definition at line 288 of file propsheet.h.

#define PSM_SHEETCMD   0xF1D2L

Sends a MSG_SHEETCMD message to all pages in the propsheet.

If you send MSG_SHEETCMD message to the propsheet control, the control will broadcast the message to all pages it contains. The page callback procedure will receive the message and handle it. If one page return non-zero value, the broadcast will be broken and the message will return a value indicating which page returned error. The value will be equal to the page index plus one.

The PSM_SHEETCMD can be used by property sheet window, i.e., the container of the property pages. The sheet can create three buttons, like "Ok", "Cancel", and "Apply". When the user clicked the "Apply" or "Ok" button, it can send a PSM_SHEETCMD message to the propsheet control, the control will then send the message to all pages to notify pages to apply the changes made by the user. If there are some errors, the page can return 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.

1 PSM_SHEETCMD
2 WPARAM wParam;
3 LPARAM lParam;
4 
5 wParam = (WPARAM)wParam;
6 lParam = (LPARAM)lParam;
Parameters
wParamThe WPARAM parameter of the MSG_SHEETCMD message.
lParamThe LPARAM parameter of the MSG_SHEETCMD message.
Returns
The message has been broken by a page, the value will be (page_index + 1); Zero indicates no page asserts an error.

Definition at line 371 of file propsheet.h.