Mike McCormack : msi: Use msi_get_property_int rather than MSI_GetPropertyW .

Alexandre Julliard julliard at wine.codeweavers.com
Fri Aug 25 13:34:17 CDT 2006


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

Author: Mike McCormack <mike at codeweavers.com>
Date:   Fri Aug 25 20:24:02 2006 +0900

msi: Use msi_get_property_int rather than MSI_GetPropertyW.

---

 dlls/msi/dialog.c |   22 ++++------------------
 1 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 5a1f550..6293fc8 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -2170,27 +2170,11 @@ static MSIRECORD *msi_get_dialog_record(
     return rec;
 }
 
-static void msi_get_screen_resolution( msi_dialog *dialog, UINT *xres, UINT *yres )
+static void msi_dialog_adjust_dialog_pos( msi_dialog *dialog, MSIRECORD *rec, LPRECT pos )
 {
-    WCHAR num[10];
-    DWORD sz = 10;
-
     static const WCHAR szScreenX[] = {'S','c','r','e','e','n','X',0};
     static const WCHAR szScreenY[] = {'S','c','r','e','e','n','Y',0};
 
-    *xres = 0;
-    *yres = 0;
-
-    MSI_GetPropertyW( dialog->package, szScreenX, num, &sz );
-    *xres = atolW( num );
-
-    sz = 10;
-    MSI_GetPropertyW( dialog->package, szScreenY, num, &sz );
-    *yres = atolW( num );
-}
-
-static void msi_dialog_adjust_dialog_pos( msi_dialog *dialog, MSIRECORD *rec, LPRECT pos )
-{
     UINT xres, yres;
     POINT center;
     SIZE sz;
@@ -2205,7 +2189,9 @@ static void msi_dialog_adjust_dialog_pos
     sz.cx = msi_dialog_scale_unit( dialog, sz.cx );
     sz.cy = msi_dialog_scale_unit( dialog, sz.cy );
 
-    msi_get_screen_resolution( dialog, &xres, &yres );
+    xres = msi_get_property_int( dialog->package, szScreenX, 0 );
+    yres = msi_get_property_int( dialog->package, szScreenY, 0 );
+
     center.x = MulDiv( center.x, xres, 100 );
     center.y = MulDiv( center.y, yres, 100 );
 




More information about the wine-cvs mailing list