Added wxNB_FLAT for WinCE property sheet tabs

Titlebar OK button on PocketPC now looks for OK, Cancel, Close buttons.
Dialog size now takes into account SIP or menubar.
Panels more naturally white on PocketPC.
wxDIALOG_EX_CONTEXTHELP ignored on WinCE since it interferes
with correct titlebar style.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2005-03-13 17:31:23 +00:00
parent 30bda36c48
commit b554cf6371
6 changed files with 76 additions and 21 deletions

View File

@@ -133,6 +133,8 @@ wxBEGIN_FLAGS( wxNotebookStyle )
wxFLAGS_MEMBER(wxNB_LEFT)
wxFLAGS_MEMBER(wxNB_RIGHT)
wxFLAGS_MEMBER(wxNB_BOTTOM)
wxFLAGS_MEMBER(wxNB_NOPAGETHEME)
wxFLAGS_MEMBER(wxNB_FLAT)
wxEND_FLAGS( wxNotebookStyle )
@@ -303,6 +305,19 @@ bool wxNotebook::Create(wxWindow *parent,
SetBackgroundColour(col);
}
}
// Undocumented hack to get flat notebook style
// In fact, we should probably only do this in some
// curcumstances, i.e. if we know we will have a border
// at the bottom (the tab control doesn't draw it itself)
#if defined(__POCKETPC__) || defined(__SMARTPHONE__)
if (HasFlag(wxNB_FLAT))
{
SendMessage(m_hwnd, CCM_SETVERSION, COMCTL32_VERSION, 0);
if (!m_hasBgCol)
SetBackgroundColour(*wxWHITE);
}
#endif
return true;
}
@@ -322,7 +337,7 @@ WXDWORD wxNotebook::MSWGetStyle(long style, WXDWORD *exstyle) const
else if ( style & wxNB_LEFT )
tabStyle |= TCS_VERTICAL;
else if ( style & wxNB_RIGHT )
tabStyle |= TCS_VERTICAL | TCS_RIGHT;
tabStyle |= TCS_VERTICAL | TCS_RIGHT;
// ex style
if ( exstyle )
@@ -992,6 +1007,17 @@ wxColour wxNotebook::MSWGetBgColourForChild(wxWindow *win)
if ( m_hasBgCol )
return GetBackgroundColour();
// Experimental: don't do this since we're doing it in wxPanel
#if 0 // defined(__POCKETPC__) || defined(__SMARTPHONE__)
// For some reason, the pages will be grey by default.
// Normally they should be white on these platforms.
// (However the static control backgrounds are painted
// in the correct colour, just not the rest of it.)
// So let's give WinCE a hint.
else if (!win->m_hasBgCol)
return *wxWHITE;
#endif
if ( !wxUxThemeEngine::GetIfActive() )
return wxNullColour;