]> git.saurik.com Git - wxWidgets.git/commitdiff
don't pass pointers to unaligned DWORDs to avoid 64 bit build problems (#9726)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 15 Jul 2008 15:22:23 +0000 (15:22 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 15 Jul 2008 15:22:23 +0000 (15:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/toplevel.cpp

index a75e3e94ccc5ac4162a33e2a5e8cf40b6823985f..faa55fe617097f998df466e29aaf6cf5bad7e264 100644 (file)
@@ -545,7 +545,13 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
 
         // reuse the code in MSWGetStyle() but correct the results slightly for
         // the dialog
-        dlgTemplate->style = MSWGetStyle(style, &dlgTemplate->dwExtendedStyle);
+        //
+        // NB: we need a temporary variable as we can't pass pointer to
+        //     dwExtendedStyle directly, it's not aligned correctly for 64 bit
+        //     architectures
+        WXDWORD dwExtendedStyle;
+        dlgTemplate->style = MSWGetStyle(style, &dwExtendedStyle);
+        dlgTemplate->dwExtendedStyle = dwExtendedStyle;
 
         // all dialogs are popups
         dlgTemplate->style |= WS_POPUP;