]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix missing dark mode support in some dialogs.
authorToni Wilen <twilen@winuae.net>
Fri, 29 Dec 2023 16:01:32 +0000 (18:01 +0200)
committerToni Wilen <twilen@winuae.net>
Fri, 29 Dec 2023 16:01:32 +0000 (18:01 +0200)
od-win32/hardfile_win32.cpp
od-win32/win32gui.cpp
od-win32/win32gui.h

index 897a98e35dfa7aec5694cfa37fea7f7b7dd3cf80..27f49c3581bbe157b67a10412ecf29ee911c4bc8 100644 (file)
@@ -439,6 +439,12 @@ static const TCHAR *hdz[] = { _T("hdz"), _T("zip"), _T("rar"), _T("7z"), NULL };
 
 static INT_PTR CALLBACK ProgressDialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
+       bool handled;
+       INT_PTR vv = commonproc2(hDlg, msg, wParam, lParam, &handled);
+       if (handled) {
+               return vv;
+       }
+
        switch(msg)
        {
        case WM_DESTROY:
@@ -1347,6 +1353,12 @@ static bool hd_get_meta_satl(HWND hDlg, HANDLE h, uae_u8 *data, TCHAR *text, str
 
 static INT_PTR CALLBACK CHSDialogProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
+       bool handled;
+       INT_PTR vv = commonproc2(hDlg, msg, wParam, lParam, &handled);
+       if (handled) {
+               return vv;
+       }
+
        switch (msg)
        {
        case WM_DESTROY:
@@ -1477,6 +1489,12 @@ static TCHAR geometry_file[MAX_DPATH];
 static struct ini_data *hdini;
 static INT_PTR CALLBACK StringBoxDialogProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
+       bool handled;
+       INT_PTR vv = commonproc2(hDlg, msg, wParam, lParam, &handled);
+       if (handled) {
+               return vv;
+       }
+
        switch(msg)
        {
        case WM_DESTROY:
index 048018d6cae1cb8e15986eb6d5ee3d2ee7549b83..85a0225ccde27fabab00998ef740a215b3658e53 100644 (file)
@@ -431,7 +431,7 @@ static int gui_get_string_cursor(int *table, HWND hDlg, int item)
        return table[posn];
 }
 
-static INT_PTR commonproc2(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam, bool *handled)
+INT_PTR commonproc2(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam, bool *handled)
 {
        if (dialog_inhibit) {
                *handled = true;
@@ -19464,10 +19464,14 @@ static void remapspeciallistview(HWND list)
 static INT_PTR CALLBACK RemapSpecialsProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
 {
        static int recursive = 0;
-       HWND list = GetDlgItem(hDlg, IDC_LISTDIALOG_LIST);
 
-       if (dialog_inhibit)
-               return 0;
+       bool handled;
+       INT_PTR vv = commonproc2(hDlg, msg, wParam, lParam, &handled);
+       if (handled) {
+               return vv;
+       }
+
+       HWND list = GetDlgItem(hDlg, IDC_LISTDIALOG_LIST);
 
        switch (msg)
        {
index 256f988c16421ecaad40c0faa7f6a2e21557a04f..f073680bfba7e56738a6fad1f3220b6595aeda27 100644 (file)
@@ -146,6 +146,7 @@ extern void scaleresource_setsize (int w, int h, int fs);
 extern HWND CustomCreateDialog(int templ, HWND hDlg, DLGPROC proc, struct customdialogstate *cds);
 extern void CustomDialogClose(HWND, int);
 extern INT_PTR CustomDialogBox (int templ, HWND hDlg, DLGPROC proc);
+INT_PTR commonproc2(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam, bool *handled);
 extern struct newresource *getresource (int tmpl);
 extern void scaleresource_init(const TCHAR*, int);
 extern int scaleresource_choosefont (HWND hDlg, int fonttype);