don't pass pointers to unaligned DWORDs to avoid 64 bit build problems (#9726)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-07-15 15:22:23 +00:00
parent a6b2078ddd
commit 99ea81de15

View 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;