Huw Davies : comdlg32: Set the margins groupbox title to reflect whether we are using metric or imperial measurements .

Alexandre Julliard julliard at winehq.org
Mon Jan 19 08:58:24 CST 2009


Module: wine
Branch: master
Commit: 6ca8b91f390a993f536c6493deb2c9e267b6380e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6ca8b91f390a993f536c6493deb2c9e267b6380e

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Jan 15 14:13:43 2009 +0000

comdlg32: Set the margins groupbox title to reflect whether we are using metric or imperial measurements.

---

 dlls/comdlg32/printdlg.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c
index 47c3b34..be0eaf8 100644
--- a/dlls/comdlg32/printdlg.c
+++ b/dlls/comdlg32/printdlg.c
@@ -2861,6 +2861,15 @@ static void update_margin_edits(HWND hDlg, const PageSetupDataA *pda)
     SetDlgItemTextW(hDlg, edt7, str);
 }
 
+static void set_margin_groupbox_title(HWND hDlg, const PageSetupDataA *pda)
+{
+    WCHAR title[256];
+
+    if(LoadStringW(COMDLG32_hInstance, is_metric(pda) ? PD32_MARGINS_IN_MILLIMETERS : PD32_MARGINS_IN_INCHES,
+                   title, sizeof(title)/sizeof(title[0])))
+        SetDlgItemTextW(hDlg, grp4, title);
+}
+
 /********************************************************************************
  * PRINTDLG_PS_WMCommandA
  * process WM_COMMAND message for PageSetupDlgA
@@ -3351,6 +3360,7 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
             pda->dlga->rtMargin.bottom = size;
         }
         update_margin_edits(hDlg, pda);
+        set_margin_groupbox_title(hDlg, pda);
 
 	/* if paper disabled */
 	if (pda->dlga->Flags & PSD_DISABLEPAPER) {




More information about the wine-cvs mailing list