projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adde wxSTC bakefile
[wxWidgets.git]
/
src
/
msw
/
toplevel.cpp
diff --git
a/src/msw/toplevel.cpp
b/src/msw/toplevel.cpp
index 7d0164a3c0ccd1b5b0ab795ad01c1a6949c667d7..b12a323c5a1a5e4064f34097e715cea519323b1b 100644
(file)
--- a/
src/msw/toplevel.cpp
+++ b/
src/msw/toplevel.cpp
@@
-141,7
+141,7
@@
WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const
WXDWORD msflags = wxWindow::MSWGetStyle
(
(style & ~wxBORDER_MASK) | wxBORDER_NONE, exflags
WXDWORD msflags = wxWindow::MSWGetStyle
(
(style & ~wxBORDER_MASK) | wxBORDER_NONE, exflags
- ) & ~WS_CHILD;
+ ) & ~WS_CHILD
& ~WS_VISIBLE
;
// first select the kind of window being created
//
// first select the kind of window being created
//
@@
-191,7
+191,7
@@
WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const
if ( exflags )
{
if ( exflags )
{
-#if !defined(__WIN16__)
&& !defined(__SC__)
+#if !defined(__WIN16__)
if ( !(GetExtraStyle() & wxTOPLEVEL_EX_DIALOG) )
{
if ( style & wxFRAME_TOOL_WINDOW )
if ( !(GetExtraStyle() & wxTOPLEVEL_EX_DIALOG) )
{
if ( style & wxFRAME_TOOL_WINDOW )
@@
-732,9
+732,9
@@
bool wxTopLevelWindowMSW::EnableCloseButton(bool enable)
HMENU hmenu = ::GetSystemMenu(GetHwnd(), FALSE /* get it */);
if ( !hmenu )
{
HMENU hmenu = ::GetSystemMenu(GetHwnd(), FALSE /* get it */);
if ( !hmenu )
{
- wxLogLastError(_T("GetSystemMenu"));
-
- return
FALSE
;
+ // no system menu at all -- ok if we want to remove the close button
+ // anyhow, but bad if we want to show it
+ return
!enable
;
}
// enabling/disabling the close item from it also automatically
}
// enabling/disabling the close item from it also automatically
@@
-760,6
+760,9
@@
bool wxTopLevelWindowMSW::EnableCloseButton(bool enable)
bool wxTopLevelWindowMSW::SetShape(const wxRegion& region)
{
bool wxTopLevelWindowMSW::SetShape(const wxRegion& region)
{
+ wxCHECK_MSG( HasFlag(wxFRAME_SHAPED), FALSE,
+ _T("Shaped windows must be created with the wxFRAME_SHAPED style."));
+
// The empty region signifies that the shape should be removed from the
// window.
if ( region.IsEmpty() )
// The empty region signifies that the shape should be removed from the
// window.
if ( region.IsEmpty() )