https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fced1c11927553ab71a4aa8bf1fd947b96079493

commit fced1c11927553ab71a4aa8bf1fd947b96079493
Author:     Stanislav Motylkov <[email protected]>
AuthorDate: Mon Jun 20 02:06:37 2022 +0300
Commit:     Stanislav Motylkov <[email protected]>
CommitDate: Mon Jun 20 02:14:02 2022 +0300

    [DESKADP][DESKMON] Notify property sheet that DWLP_MSGRESULT is set
    
    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 | 1 +
 dll/shellext/deskmon/deskmon.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/dll/shellext/deskadp/deskadp.c b/dll/shellext/deskadp/deskadp.c
index 3ec5460255d..a247f5e79a7 100644
--- a/dll/shellext/deskadp/deskadp.c
+++ b/dll/shellext/deskadp/deskadp.c
@@ -422,6 +422,7 @@ DisplayAdapterDlgProc(HWND hwndDlg,
                     SetWindowLongPtr(hwndDlg,
                                      DWLP_MSGRESULT,
                                      ApplyDisplayAdapterChanges(This));
+                    Ret = TRUE;
                     break;
                 }
 
diff --git a/dll/shellext/deskmon/deskmon.c b/dll/shellext/deskmon/deskmon.c
index 21551a6ceb5..7cdcd560b13 100644
--- a/dll/shellext/deskmon/deskmon.c
+++ b/dll/shellext/deskmon/deskmon.c
@@ -666,6 +666,7 @@ MonitorDlgProc(HWND hwndDlg,
                     SetWindowLongPtr(hwndDlg,
                                      DWLP_MSGRESULT,
                                      ApplyMonitorChanges(This));
+                    Ret = TRUE;
                     break;
                 }
 

Reply via email to