buttons in page setup now working properly (for En and De only)
Modified: trunk/reactos/subsys/system/notepad/De.rc
Modified: trunk/reactos/subsys/system/notepad/En.rc
Modified: trunk/reactos/subsys/system/notepad/dialog.c
_____
Modified: trunk/reactos/subsys/system/notepad/De.rc
--- trunk/reactos/subsys/system/notepad/De.rc 2006-01-06 20:53:32 UTC
(rev 20630)
+++ trunk/reactos/subsys/system/notepad/De.rc 2006-01-06 22:41:42 UTC
(rev 20631)
@@ -95,8 +95,8 @@
LTEXT "&Unten:", 0x14E,100, 73, 30, 10, WS_CHILD
EDITTEXT /*STRING_PAGESETUP_BOTTOMVALUE,*/ 0x150, 130, 73, 35, 11,
WS_CHILD | WS_BORDER | WS_TABSTOP
-DEFPUSHBUTTON "OK", 0x151, 180, 3, 40, 15,
WS_TABSTOP
-PUSHBUTTON "Abbrechen", 0x152, 180, 21, 40, 15,
WS_TABSTOP
+DEFPUSHBUTTON "OK", IDOK, 180, 3, 40, 15,
WS_TABSTOP
+PUSHBUTTON "Abbrechen", IDCANCEL, 180, 21, 40, 15,
WS_TABSTOP
PUSHBUTTON "&Hilfe", 0x153, 180, 39, 40, 15,
WS_TABSTOP
}
_____
Modified: trunk/reactos/subsys/system/notepad/En.rc
--- trunk/reactos/subsys/system/notepad/En.rc 2006-01-06 20:53:32 UTC
(rev 20630)
+++ trunk/reactos/subsys/system/notepad/En.rc 2006-01-06 22:41:42 UTC
(rev 20631)
@@ -97,8 +97,8 @@
LTEXT "&Bottom:", 0x14E,100, 73, 30, 10, WS_CHILD
EDITTEXT /*STRING_PAGESETUP_BOTTOMVALUE,*/ 0x150, 130, 73, 35, 11,
WS_CHILD | WS_BORDER | WS_TABSTOP
-DEFPUSHBUTTON "OK", 0x151, 180, 3, 40, 15,
WS_TABSTOP
-PUSHBUTTON "Cancel", 0x152, 180, 21, 40, 15,
WS_TABSTOP
+DEFPUSHBUTTON "OK", IDOK, 180, 3, 40, 15,
WS_TABSTOP
+PUSHBUTTON "Cancel", IDCANCEL, 180, 21, 40, 15,
WS_TABSTOP
PUSHBUTTON "&Help", 0x153, 180, 39, 40, 15,
WS_TABSTOP
}
_____
Modified: trunk/reactos/subsys/system/notepad/dialog.c
--- trunk/reactos/subsys/system/notepad/dialog.c 2006-01-06
20:53:32 UTC (rev 20630)
+++ trunk/reactos/subsys/system/notepad/dialog.c 2006-01-06
22:41:42 UTC (rev 20631)
@@ -847,51 +847,54 @@
static INT_PTR WINAPI DIALOG_PAGESETUP_DlgProc(HWND hDlg, UINT msg,
WPARAM wParam, LPARAM lParam)
{
- switch (msg)
+ switch (msg)
{
case WM_COMMAND:
- switch (wParam)
+ if (HIWORD(wParam) == BN_CLICKED)
{
- case IDOK:
- /* save user input and close dialog */
- GetDlgItemText(hDlg, 0x141, Globals.szHeader,
SIZEOF(Globals.szHeader));
- GetDlgItemText(hDlg, 0x143, Globals.szFooter,
SIZEOF(Globals.szFooter));
- GetDlgItemText(hDlg, 0x14A, Globals.szMarginTop,
SIZEOF(Globals.szMarginTop));
- GetDlgItemText(hDlg, 0x150, Globals.szMarginBottom,
SIZEOF(Globals.szMarginBottom));
- GetDlgItemText(hDlg, 0x147, Globals.szMarginLeft,
SIZEOF(Globals.szMarginLeft));
- GetDlgItemText(hDlg, 0x14D, Globals.szMarginRight,
SIZEOF(Globals.szMarginRight));
- EndDialog(hDlg, IDOK);
- return TRUE;
+ switch (LOWORD(wParam))
+ {
+ case IDOK:
+ /* save user input and close dialog */
+ GetDlgItemText(hDlg, 0x141, Globals.szHeader,
SIZEOF(Globals.szHeader));
+ GetDlgItemText(hDlg, 0x143, Globals.szFooter,
SIZEOF(Globals.szFooter));
+ GetDlgItemText(hDlg, 0x14A, Globals.szMarginTop,
SIZEOF(Globals.szMarginTop));
+ GetDlgItemText(hDlg, 0x150, Globals.szMarginBottom,
SIZEOF(Globals.szMarginBottom));
+ GetDlgItemText(hDlg, 0x147, Globals.szMarginLeft,
SIZEOF(Globals.szMarginLeft));
+ GetDlgItemText(hDlg, 0x14D, Globals.szMarginRight,
SIZEOF(Globals.szMarginRight));
+ EndDialog(hDlg, IDOK);
+ return TRUE;
- case IDCANCEL:
- /* discard user input and close dialog */
- EndDialog(hDlg, IDCANCEL);
- return TRUE;
+ case IDCANCEL:
+ /* discard user input and close dialog */
+ EndDialog(hDlg, IDCANCEL);
+ return TRUE;
- case IDHELP:
- {
- /* FIXME: Bring this to work */
- static const WCHAR sorryW[] = {
'S','o','r','r','y',',','
','n','o','
','h','e','l','p','
','a','v','a','i','l','a','b','l','e',0
};
- static const WCHAR helpW[] = {
'H','e','l','p',0 };
- MessageBox(Globals.hMainWnd, sorryW, helpW,
MB_ICONEXCLAMATION);
- return TRUE;
- }
+ case IDHELP:
+ {
+ /* FIXME: Bring this to work */
+ static const WCHAR sorryW[] = {
'S','o','r','r','y',',','
','n','o','
','h','e','l','p','
','a','v','a','i','l','a','b','l','e',0
};
+ static const WCHAR helpW[] = {
'H','e','l','p',0 };
+ MessageBox(Globals.hMainWnd, sorryW, helpW,
MB_ICONEXCLAMATION);
+ return TRUE;
+ }
- default:
- break;
+ default:
+ break;
+ }
}
- break;
+ break;
case WM_INITDIALOG:
- /* fetch last user input prior to display dialog */
- SetDlgItemText(hDlg, 0x141, Globals.szHeader);
- SetDlgItemText(hDlg, 0x143, Globals.szFooter);
- SetDlgItemText(hDlg, 0x14A, Globals.szMarginTop);
- SetDlgItemText(hDlg, 0x150, Globals.szMarginBottom);
- SetDlgItemText(hDlg, 0x147, Globals.szMarginLeft);
- SetDlgItemText(hDlg, 0x14D, Globals.szMarginRight);
- break;
+ /* fetch last user input prior to display dialog */
+ SetDlgItemText(hDlg, 0x141, Globals.szHeader);
+ SetDlgItemText(hDlg, 0x143, Globals.szFooter);
+ SetDlgItemText(hDlg, 0x14A, Globals.szMarginTop);
+ SetDlgItemText(hDlg, 0x150, Globals.szMarginBottom);
+ SetDlgItemText(hDlg, 0x147, Globals.szMarginLeft);
+ SetDlgItemText(hDlg, 0x14D, Globals.szMarginRight);
+ break;
}
- return FALSE;
+ return FALSE;
}