better handling for the style changing during run-time

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-02-17 22:43:43 +00:00
parent 07215d86e0
commit b2d5a7ee00
8 changed files with 218 additions and 94 deletions

View File

@@ -124,6 +124,8 @@ public:
// Implementation from now on
// --------------------------
virtual void SetWindowStyleFlag(long style);
virtual void Command(wxCommandEvent& event);
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
@@ -204,6 +206,8 @@ protected:
virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg);
virtual wxSize DoGetBestSize() const;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
#if wxUSE_RICHEDIT
// we're using RICHEDIT (and not simple EDIT) control if this field is not
// 0, it also gives the version of the RICHEDIT control being used (1, 2 or

View File

@@ -88,11 +88,8 @@ protected:
// common part of Iconize(), Maximize() and Restore()
void DoShowWindow(int nShowCmd);
// get the MSW window flags corresponding to wxWindows ones
//
// the functions returns the flags (WS_XXX) directly and puts the ext
// (WS_EX_XXX) flags into the provided pointer if not NULL
long MSWGetCreateWindowFlags(long *exflags) const;
// translate wxWindows flags to Windows ones
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const;
// is the frame currently iconized?
bool m_iconized;

View File

@@ -98,6 +98,7 @@ public:
virtual void Freeze();
virtual void Thaw();
virtual void SetWindowStyleFlag( long style );
virtual bool SetCursor( const wxCursor &cursor );
virtual bool SetFont( const wxFont &font );
@@ -169,13 +170,6 @@ public:
wxWindow* GetWindowChild(wxWindowID id);
#endif // __WXUNIVERSAL__
// a MSW only function which sends a size event to the window using its
// current size - this has an effect of refreshing the window layout
/*
FUNCTION IS NOW A MEMBER OF wxFrame - gt
void SendSizeEvent();
*/
// implementation from now on
// --------------------------
@@ -215,12 +209,27 @@ public:
// Make a Windows extended style from the given wxWindows window style
static WXDWORD MakeExtendedStyle(long style,
bool eliminateBorders = FALSE);
// Determine whether 3D effects are wanted
WXDWORD Determine3DEffects(WXDWORD defaultBorderStyle, bool *want3D) const;
// MSW only: TRUE if this control is part of the main control
virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; };
// translate wxWindows style flags for this control into the Windows style
// and optional extended style for the corresponding native control
//
// this is the function that should be overridden in the derived classes,
// but you will mostly use MSWGetCreateWindowFlags() below
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
// get the MSW window flags corresponding to wxWindows ones
//
// the functions returns the flags (WS_XXX) directly and puts the ext
// (WS_EX_XXX) flags into the provided pointer if not NULL
WXDWORD MSWGetCreateWindowFlags(WXDWORD *exflags = NULL) const
{ return MSWGetStyle(GetWindowStyle(), exflags); }
// translate wxWindows coords into Windows ones suitable to be passed to
// ::CreateWindow()
//

View File

@@ -327,7 +327,7 @@ public:
// extra style: the less often used style bits which can't be set with
// SetWindowStyleFlag()
void SetExtraStyle(long exStyle) { m_exStyle = exStyle; }
virtual void SetExtraStyle(long exStyle) { m_exStyle = exStyle; }
long GetExtraStyle() const { return m_exStyle; }
// make the window modal (all other windows unresponsive)