Article ID: 130765
Article Last Modified on 7/11/2005
//
// FUNCTION: SheetDialogProc(HWND, UINT, WPARAM, LPARAM)
//
// PURPOSE: Processes messages for a page in the PPT sheet control.
//
// PARAMETERS:
// hdlg - Window handle of the property sheet.
// wMessage - Type of message.
// wparam - Message-specific information.
// lparam - Message-specific information.
//
// RETURN VALUE:
// TRUE - Message handled.
// FALSE - Message not handled.
//
LRESULT CALLBACK SheetDialogProc(HWND hdlg,
UINT uMessage,
WPARAM wparam,
LPARAM lparam)
{
LPNMHDR lpnmhdr;
HWND hwndPropSheet;
switch (uMessage)
{
case WM_INITDIALOG:
// Do whatever initializations you have here.
return TRUE;
case WM_NOTIFY:
// More code here.
break;
case WM_COMMAND:
switch(LOWORD(wparam))
{
case IDCANCEL:
// Forward this message to the parent window
// so that the PPT sheet is dismissed.
SendMessage(GetParent(hdlg),
uMessage,
wparam,
lparam);
beak;
default:
break;
}
break;
}
NOTE: This solution also works with wizard controls. This behavior is seen
under both Windows NT and Windows 95; the solution in this article works
for both platforms.
Additional query words: user styles
Keywords: kbctrl kbprb kbpropsheet KB130765