This commit is contained in:
Igor Pavlov
2011-04-11 00:00:00 +00:00
committed by Kornel Lesiński
parent de4f8c22fe
commit 35596517f2
322 changed files with 9989 additions and 7759 deletions
+8 -9
View File
@@ -2,10 +2,10 @@
#include "StdAfx.h"
#ifndef _UNICODE
#include "Common/StringConvert.h"
#endif
#include "Windows/Control/Dialog.h"
#ifndef _UNICODE
#include "../../Common/StringConvert.h"
#endif
extern HINSTANCE g_hInstance;
#ifndef _UNICODE
@@ -17,17 +17,16 @@ namespace NControl {
static INT_PTR APIENTRY DialogProcedure(HWND dialogHWND, UINT message, WPARAM wParam, LPARAM lParam)
{
CWindow dialogTmp(dialogHWND);
CWindow tempDialog(dialogHWND);
if (message == WM_INITDIALOG)
dialogTmp.SetUserDataLongPtr(lParam);
CDialog *dialog = (CDialog *)(dialogTmp.GetUserDataLongPtr());
tempDialog.SetUserDataLongPtr(lParam);
CDialog *dialog = (CDialog *)(tempDialog.GetUserDataLongPtr());
if (dialog == NULL)
return FALSE;
if (message == WM_INITDIALOG)
dialog->Attach(dialogHWND);
try { return BoolToBOOL(dialog->OnMessage(message, wParam, lParam)); }
catch(...) { return true; }
catch(...) { return TRUE; }
}
bool CDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
@@ -68,7 +67,7 @@ bool CDialog::OnCommand(int code, int itemID, LPARAM lParam)
bool CDialog::OnButtonClicked(int buttonID, HWND /* buttonHWND */)
{
switch(buttonID)
switch (buttonID)
{
case IDOK: OnOK(); break;
case IDCANCEL: OnCancel(); break;