[DESKADP][DESKMON] Notify property sheet that DWLP_MSGRESULT is set
authorStanislav Motylkov <x86corez@gmail.com>
Sun, 19 Jun 2022 23:06:37 +0000 (02:06 +0300)
committerStanislav Motylkov <x86corez@gmail.com>
Sun, 19 Jun 2022 23:14:02 +0000 (02:14 +0300)
When FALSE is returned, Apply button ignores validation result
and becomes disabled after clicking as if settings were applied.
Fix it by setting the return value to TRUE.

See https://docs.microsoft.com/en-us/windows/win32/controls/psn-apply

dll/shellext/deskadp/deskadp.c
dll/shellext/deskmon/deskmon.c

index 3ec5460..a247f5e 100644 (file)
@@ -422,6 +422,7 @@ DisplayAdapterDlgProc(HWND hwndDlg,
                     SetWindowLongPtr(hwndDlg,
                                      DWLP_MSGRESULT,
                                      ApplyDisplayAdapterChanges(This));
+                    Ret = TRUE;
                     break;
                 }
 
index 21551a6..7cdcd56 100644 (file)
@@ -666,6 +666,7 @@ MonitorDlgProc(HWND hwndDlg,
                     SetWindowLongPtr(hwndDlg,
                                      DWLP_MSGRESULT,
                                      ApplyMonitorChanges(This));
+                    Ret = TRUE;
                     break;
                 }