Table 4-1 lists and describes the messages that support property sheets in Windows 95. If you need to find more detailed information about the parameters and return values for these messages, you can refer to the Win32 SDK documentation.
Message | Description |
PSM_ADDPAGE | Adds a page to the end of an existing property sheet. An added page should be no larger than the maximum size already in use, because the property sheet will not resize dynamically added pages and because the size of the property sheet itself cannot change. |
PSM_APPLY | Simulates clicking the Apply button. This message returns TRUE if and only if every page successfully saved its information. |
PSM_CANCELTOCLOSE | Sent when a change is made that cannot be canceled in the property sheet. It disables the Cancel button and changes the OK button to Close. |
PSM_CHANGED | Sent to a property sheet when information in a page has changed. The property sheet changes the page name to italic text in the list of pages, and the Apply button is enabled. (This button is initially disabled when a page becomes active and there are no property changes to apply yet.) When the page receives user input through one of its controls, indicating that the user has edited a property, the page sends the PSM_CHANGED message to the property sheet. If the user then clicks the Apply button or the Cancel button, the page reinitializes its controls and sends the PSM_UNCHANGED message to redisable the Apply button. Sometimes the Apply button causes a page to change a property sheet, and the change cannot be undone. In that case, the page sends the PSM_CANCELTOCLOSE message to the property sheet, which changes the Cancel button to Close, indicating to the user that the applied changes cannot be canceled. |
PSM_GETTABCONTROL | Retrieves a handle to a tab control. |
PSM_PRESSBUTTON | Causes the specified button to appear pressed (to be selected). wParam, the ID of the button, can be one of the following values: |
PSBTN_BACK | Select the Back button |
PSBTN_NEXT | Select the Next button |
PSBTN_FINISH | Select the Finish button |
PSBTN_OK | Select the OK button |
PSBTN_APPLYNOW | Select the Apply button |
PSBTN_CANCEL | Select the Cancel button |
PSBTN_HELP | Select the Help button |
Table 4-1. Property sheet messages. (continued)
Message | Description |
PSM_QUERYSIBLINGS | Forwarded to each property sheet page until a page returns a nonzero value, which becomes the return value of this message. This message is convenient for passing information between pages that don't know about one another. For example, the printer property page extensions use this message to communicate with the property sheet pages provided by the system. |
PSM_REBOOTSYSTEM | Sent when the user must reboot to have the changes specified in the property sheet take effect. The page sends this notification only in response to a PSN_APPLY or PSN_KILLACTIVE notification. The PSM_REBOOTSYSTEM message supersedes all PSM_RESTARTWINDOWS notifications that precede or follow. It causes the property sheet return value to be ID_PSREBOOTSYSTEM if the user chooses OK to close the property sheet. |
PSM_REMOVEPAGE | Removes a page from an existing property sheet. If hPage is NULL or does not exist, the property sheet removes the page at the location specified by the index parameter. When a page is defined, an application can specify the address of a ReleasePropSheetPageProc callback function that the property sheet calls when it is removing the page. Using a ReleasePropSheetPageProc function gives an application the opportunity to perform cleanup operations for individual pages. |
PSM_RESTARTWINDOWS | Sent when the user must restart Windows to have changes specified in the property sheet take effect. The page sends this notification only in response to a PSN_APPLY or PSN_KILLACTIVE notification. This causes the property sheet to return ID_PSRESTARTWINDOWS if the user chooses OK to close the property sheet. |
PSM_SETCURSEL | Sent to the property sheet to change focus to a different page. If hPage is NULL or does not exist, the property sheet sets the active page at the location specified by the index parameter. |
PSM_SETCURSELID | Sets the active page by the ID of the tab or the hPage as specified in lParam. |
Table 4-1. continued
Message | Description |
PSM_SETFINISHTEXT | Enables the Finish button, hides the Back button, and sets the text on the Finish button to the text specified in lParam. |
PSM_SETTITLE | Changes the caption for the property sheet. |
PSM_SETWIZBUTTONS | Specifies which buttons should be enabled in a wizard-style property sheet. lParam can be a combination of the following values: |
PSWIZB_BACK | Enable the Back button |
PSWIZB_NEXT | Enable the Next button |
PSWIZB_FINISH | Enable the Finish button |
PSM_UNCHANGED | Sent to a property sheet when the information in a page has reverted to its previously saved state. The property sheet cancels any changes caused by PSM_CHANGED. The Apply button is disabled if no pages with registered changes remain. |