mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-11 00:07:09 -06:00
3.13
This commit is contained in:
59
Windows/Control/PropertyPage.cpp
Executable file
59
Windows/Control/PropertyPage.cpp
Executable 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;
|
||||
}
|
||||
|
||||
|
||||
}}
|
||||
Reference in New Issue
Block a user