X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b89e104ec0b9a591a82703a00fcac3432a93cf41..8a6270322b0767fd7f9956f90538ca55d341fab5:/src/msw/toplevel.cpp?ds=inline diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 11aa012a7f..faa55fe617 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -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; @@ -1080,7 +1086,7 @@ void wxTopLevelWindowMSW::RequestUserAttention(int flags) #if defined(FLASHW_STOP) && defined(VK_XBUTTON1) && wxUSE_DYNLIB_CLASS // available in the headers, check if it is supported by the system typedef BOOL (WINAPI *FlashWindowEx_t)(FLASHWINFO *pfwi); - FlashWindowEx_t s_pfnFlashWindowEx = NULL; + static FlashWindowEx_t s_pfnFlashWindowEx = NULL; if ( !s_pfnFlashWindowEx ) { wxDynamicLibrary dllUser32(_T("user32.dll"));