X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9102b3671a45d116d781b0c8e90d2e9a84fbdcb..3c203a185145a1aa720faf53e7f6fbebb35bce7a:/src/msw/toplevel.cpp?ds=sidebyside diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 09e60871b1..04f8e5de1f 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -148,10 +148,6 @@ void wxTopLevelWindowMSW::Init() #if defined(__SMARTPHONE__) && defined(__WXWINCE__) m_MenuBarHWND = 0; #endif -#ifdef __POCKETPC__ - // A dummy menubar for dialogs - m_menuBarHWND = 0; -#endif } WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const @@ -185,8 +181,10 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const *exflags |= WS_EX_DLGMODALFRAME; else if ( !(style & wxBORDER_NONE) ) msflags |= WS_BORDER; +#ifndef __POCKETPC__ else msflags |= WS_POPUP; +#endif #endif // normally we consider that all windows without a caption must be popups, @@ -419,27 +417,6 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate, ::SetWindowText(GetHwnd(), title); } -#ifdef __POCKETPC__ - // Create an empty menubar so that we don't see the menubar underneath - SHMENUBARINFO mbi; - - memset (&mbi, 0, sizeof (SHMENUBARINFO)); - mbi.cbSize = sizeof (SHMENUBARINFO); - mbi.hwndParent = (HWND) GetParent()->GetHWND(); - mbi.nToolBarId = 5000; - mbi.nBmpId = 0; - mbi.cBmpImages = 0; - mbi.dwFlags = 0 ; // SHCMBF_EMPTYBAR; - mbi.hInstRes = wxGetInstance(); - - if (!SHCreateMenuBar(&mbi)) - { - wxFAIL_MSG( _T("SHCreateMenuBar failed") ); - } - - m_menuBarHWND = (WXHWND) mbi.hwndMB; -#endif - SubclassWin(m_hWnd); #ifdef __SMARTPHONE__ @@ -470,10 +447,6 @@ bool wxTopLevelWindowMSW::CreateFrame(const wxString& title, bool result = MSWCreate(wxCanvasClassName, title, pos, sz, flags, exflags); -#ifdef __SMARTPHONE__ - // Work around title non-display glitch - Show(false); -#endif return result; } @@ -533,9 +506,11 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent, // all dialogs are popups dlgTemplate->style |= WS_POPUP; +#ifndef __WXWINCE__ // force 3D-look if necessary, it looks impossibly ugly otherwise if ( style & (wxRESIZE_BORDER | wxCAPTION) ) dlgTemplate->style |= DS_MODALFRAME; +#endif ret = CreateDialog(dlgTemplate, title, pos, sizeReal); free(dlgTemplate); @@ -569,9 +544,8 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent, ); } - // Native look is full screen window on Smartphones and Standard SDK. - // TODO: check that we need this (if we're passing default values to ctor). - // Also check that there really is a difference between PocketPC and Smartphone in this regard. + // Note: if we include PocketPC in this test, dialogs can fail to show up, + // for example the text entry dialog in the dialogs sample. Problem with Maximise()? #if defined(__WXWINCE__) && (defined(__SMARTPHONE__) || defined(__WINCE_STANDARDSDK__)) if ( style & wxMAXIMIZE ) { @@ -588,15 +562,6 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent, wxTopLevelWindowMSW::~wxTopLevelWindowMSW() { -#ifdef __POCKETPC__ - // Destroy the dummy menubar for dialogs - if (m_menuBarHWND) - { - ::DestroyWindow((HWND) m_menuBarHWND); - m_menuBarHWND = 0; - } -#endif - // after destroying an owned window, Windows activates the next top level // window in Z order but it may be different from our owner (to reproduce // this simply Alt-TAB to another application and back before closing the