This commit is contained in:
Igor Pavlov
2003-12-11 00:00:00 +00:00
committed by Kornel Lesiński
commit 8c1b5c7b7e
982 changed files with 118799 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
// Windows/Control/PropertyPage.cpp
#include "StdAfx.h"
#include "Windows/Control/PropertyPage.h"
namespace NWindows {
namespace NControl {
BOOL APIENTRY ProperyPageProcedure(HWND dialogHWND, UINT message,
UINT wParam, LONG lParam)
{
CDialog tempDialog(dialogHWND);
if (message == WM_INITDIALOG)
tempDialog.SetUserDataLongPtr(((PROPSHEETPAGE *)lParam)->lParam);
CDialog *dialog = (CDialog *)(tempDialog.GetUserDataLongPtr());
if (message == WM_INITDIALOG)
dialog->Attach(dialogHWND);
switch (message)
{
case WM_INITDIALOG:
return dialog->OnInit();
case WM_COMMAND:
return dialog->OnCommand(wParam, lParam);
case WM_NOTIFY:
return dialog->OnNotify(wParam, (LPNMHDR) lParam);
}
if (dialog == NULL)
return false;
return dialog->OnMessage(message, wParam, lParam);
}
bool CPropertyPage::OnNotify(UINT controlID, LPNMHDR lParam)
{
switch(lParam->code)
{
case PSN_APPLY:
SetMsgResult(OnApply(LPPSHNOTIFY(lParam)));
break;
case PSN_KILLACTIVE:
SetMsgResult(BoolToBOOL(OnKillActive(LPPSHNOTIFY(lParam))));
break;
case PSN_SETACTIVE:
SetMsgResult(OnSetActive(LPPSHNOTIFY(lParam)));
break;
case PSN_RESET:
OnReset(LPPSHNOTIFY(lParam));
break;
case PSN_HELP:
OnNotifyHelp(LPPSHNOTIFY(lParam));
break;
default:
return false;
}
return true;
}
}}