From 504c654fb314941fe8c4c88df22ad171cbe7a9f7 Mon Sep 17 00:00:00 2001 From: adelikat Date: Wed, 10 Sep 2008 03:16:54 +0000 Subject: [PATCH] Config has an X button. Functionally works as a cancel (so you aren't forced to save the changes you made. --- desmume/src/windows/ConfigKeys.cpp | 5 +++++ desmume/src/windows/main.cpp | 2 +- desmume/src/windows/resources.rc | 12 ++++++------ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/desmume/src/windows/ConfigKeys.cpp b/desmume/src/windows/ConfigKeys.cpp index 4b39c26f9..645f47ef7 100644 --- a/desmume/src/windows/ConfigKeys.cpp +++ b/desmume/src/windows/ConfigKeys.cpp @@ -273,6 +273,11 @@ BOOL CALLBACK ConfigView_Proc(HWND dialog,UINT komunikat,WPARAM wparam,LPARAM lp //SendDlgItemMessage(dialog,IDC_COMBO13,CB_SETCURSEL,KEY_DEBUG,0); break; + case WM_CLOSE: + case WM_QUIT: + EndDialog(dialog,0); + return 1; + break; case WM_COMMAND: if((HIWORD(wparam)==BN_CLICKED)&&(((int)LOWORD(wparam))==IDC_BUTTON1)) { diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 66b038278..61888e917 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -1171,7 +1171,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM ReleaseCapture(); NDS_releasTouch(); return 0; - case WM_COMMAND: + case WM_COMMAND: switch(LOWORD(wParam)) { case IDM_OPEN: diff --git a/desmume/src/windows/resources.rc b/desmume/src/windows/resources.rc index 593e7b18a..a40ad84ee 100644 --- a/desmume/src/windows/resources.rc +++ b/desmume/src/windows/resources.rc @@ -206,10 +206,10 @@ END // Dialog // -IDD_CONFIG DIALOG 0, 0, 125, 227 -STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUP | WS_CAPTION +IDD_CONFIG DIALOGEX 0, 0, 125, 227 +STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Konfigurer Input" -FONT 8, "MS Sans Serif" +FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDC_FERMER,67,208,50,14 PUSHBUTTON "Standard",IDC_BUTTON1,7,208,50,14 @@ -741,10 +741,10 @@ END // Dialog // -IDD_CONFIG DIALOG 0, 0, 125, 227 -STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUP | WS_CAPTION +IDD_CONFIG DIALOGEX 0, 0, 125, 227 +STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Configure Keys" -FONT 8, "MS Sans Serif" +FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDC_FERMER,67,208,50,14 PUSHBUTTON "Default",IDC_BUTTON1,7,208,50,14