git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26616
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual void SetIcons(const wxIconBundle& icons );
virtual void Restore();
virtual void SetIcons(const wxIconBundle& icons );
virtual void Restore();
virtual bool SetShape(const wxRegion& region);
virtual bool SetShape(const wxRegion& region);
virtual bool Show(bool show = TRUE);
virtual bool Show(bool show = TRUE);
#include "wx/msw/missing.h"
#include "wx/msw/winundef.h"
#include "wx/msw/missing.h"
#include "wx/msw/winundef.h"
-// This can't be undefed in winundef.h or
-// there are further errors
-#if defined(__WXWINCE__) && defined(CreateDialog)
-#undef CreateDialog
-#endif
-
#include "wx/display.h"
#ifndef ICON_BIG
#include "wx/display.h"
#ifndef ICON_BIG
msflags |= WS_POPUP;
else
{
msflags |= WS_POPUP;
else
{
msflags |= WS_OVERLAPPED;
}
// border and caption styles
if ( style & wxRESIZE_BORDER )
msflags |= WS_OVERLAPPED;
}
// border and caption styles
if ( style & wxRESIZE_BORDER )
msflags |= WS_THICKFRAME;
msflags |= WS_THICKFRAME;
else if ( exflags && ((style & wxBORDER_DOUBLE) || (style & wxBORDER_RAISED)) )
*exflags |= WS_EX_DLGMODALFRAME;
else if ( !(style & wxBORDER_NONE) )
msflags |= WS_BORDER;
else if ( exflags && ((style & wxBORDER_DOUBLE) || (style & wxBORDER_RAISED)) )
*exflags |= WS_EX_DLGMODALFRAME;
else if ( !(style & wxBORDER_NONE) )
msflags |= WS_BORDER;
else
msflags |= WS_POPUP;
else
msflags |= WS_POPUP;
if ( style & wxCAPTION )
msflags |= WS_CAPTION;
if ( style & wxCAPTION )
msflags |= WS_CAPTION;
else
msflags |= WS_POPUP;
else
msflags |= WS_POPUP;
// next translate the individual flags
if ( style & wxMINIMIZE_BOX )
// next translate the individual flags
if ( style & wxMINIMIZE_BOX )
msflags |= WS_MAXIMIZEBOX;
if ( style & wxSYSTEM_MENU )
msflags |= WS_SYSMENU;
msflags |= WS_MAXIMIZEBOX;
if ( style & wxSYSTEM_MENU )
msflags |= WS_SYSMENU;
+
+ // under CE these 2 styles are not defined currently
+#ifdef WS_MINIMIZE
if ( style & wxMINIMIZE )
msflags |= WS_MINIMIZE;
if ( style & wxMINIMIZE )
msflags |= WS_MINIMIZE;
+#endif // WS_MINIMIZE
+#ifdef WS_MAXIMIZE
if ( style & wxMAXIMIZE )
msflags |= WS_MAXIMIZE;
if ( style & wxMAXIMIZE )
msflags |= WS_MAXIMIZE;
// Keep this here because it saves recoding this function in wxTinyFrame
// Keep this here because it saves recoding this function in wxTinyFrame
-#if wxUSE_ITSY_BITSY && !defined(__WIN32__)
- if ( style & wxTINY_CAPTION_VERT )
- msflags |= IBS_VERTCAPTION;
- if ( style & wxTINY_CAPTION_HORIZ )
- msflags |= IBS_HORZCAPTION;
-#else
if ( style & (wxTINY_CAPTION_VERT | wxTINY_CAPTION_HORIZ) )
msflags |= WS_CAPTION;
if ( style & (wxTINY_CAPTION_VERT | wxTINY_CAPTION_HORIZ) )
msflags |= WS_CAPTION;
style |= wxFRAME_NO_TASKBAR;
}
style |= wxFRAME_NO_TASKBAR;
}
+ // again, support for this is missing under CE
+#ifdef WS_EX_APPWINDOW
// We have to solve 2 different problems here:
//
// 1. frames with wxFRAME_NO_TASKBAR flag shouldn't appear in the
// We have to solve 2 different problems here:
//
// 1. frames with wxFRAME_NO_TASKBAR flag shouldn't appear in the
// The second one is solved here by using WS_EX_APPWINDOW flag, the
// first one is dealt with in our MSWGetParent() method
// implementation
// The second one is solved here by using WS_EX_APPWINDOW flag, the
// first one is dealt with in our MSWGetParent() method
// implementation
if ( !(style & wxFRAME_NO_TASKBAR) && GetParent() )
{
// need to force the frame to appear in the taskbar
*exflags |= WS_EX_APPWINDOW;
}
if ( !(style & wxFRAME_NO_TASKBAR) && GetParent() )
{
// need to force the frame to appear in the taskbar
*exflags |= WS_EX_APPWINDOW;
}
//else: nothing to do [here]
//else: nothing to do [here]
+#endif // WS_EX_APPWINDOW
}
if ( style & wxSTAY_ON_TOP )
*exflags |= WS_EX_TOPMOST;
}
if ( style & wxSTAY_ON_TOP )
*exflags |= WS_EX_TOPMOST;
if ( GetExtraStyle() & wxFRAME_EX_CONTEXTHELP )
*exflags |= WS_EX_CONTEXTHELP;
if ( GetExtraStyle() & wxFRAME_EX_CONTEXTHELP )
*exflags |= WS_EX_CONTEXTHELP;
const wxString& name)
{
bool ret wxDUMMY_INITIALIZE(false);
const wxString& name)
{
bool ret wxDUMMY_INITIALIZE(false);
// init our fields
Init();
// init our fields
Init();
- w = WidthDefault(size.x);
- h = HeightDefault(size.y);
+
+ wxSize sizeReal = size;
+ if ( !sizeReal.IsFullySpecified() )
+ {
+ sizeReal.SetDefaults(GetDefaultSize());
+ }
if ( style & (wxRESIZE_BORDER | wxCAPTION) )
dlgTemplate->style |= DS_MODALFRAME;
if ( style & (wxRESIZE_BORDER | wxCAPTION) )
dlgTemplate->style |= DS_MODALFRAME;
- ret = CreateDialog(dlgTemplate, title, pos, wxSize(w,h));
+ ret = CreateDialog(dlgTemplate, title, pos, sizeReal);
free(dlgTemplate);
}
else // !dialog
{
free(dlgTemplate);
}
else // !dialog
{
- ret = CreateFrame(title, pos, wxSize(w,h));
+ ret = CreateFrame(title, pos, sizeReal);
}
if ( ret && !(GetWindowStyleFlag() & wxCLOSE_BOX) )
}
if ( ret && !(GetWindowStyleFlag() & wxCLOSE_BOX) )
bool wxTopLevelWindowMSW::SetShape(const wxRegion& region)
{
bool wxTopLevelWindowMSW::SetShape(const wxRegion& region)
{
-#ifdef __WXWINCE__
- return FALSE;
-#else
wxCHECK_MSG( HasFlag(wxFRAME_SHAPED), FALSE,
_T("Shaped windows must be created with the wxFRAME_SHAPED style."));
wxCHECK_MSG( HasFlag(wxFRAME_SHAPED), FALSE,
_T("Shaped windows must be created with the wxFRAME_SHAPED style."));
return FALSE;
}
return TRUE;
return FALSE;
}
return TRUE;
+#endif // !__WXWINCE__
+
// ----------------------------------------------------------------------------
// wxTopLevelWindow event handling
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// wxTopLevelWindow event handling
// ----------------------------------------------------------------------------