- // returns TRUE if the window has been created
- bool MSWCreate(int id,
- wxWindow *parent,
- const wxChar *wclass,
- wxWindow *wx_win,
- const wxChar *title,
- int x, int y, int width, int height,
- WXDWORD style,
- const wxChar *dialog_template = NULL,
+ // 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()
+ //
+ // returns TRUE if non default coords are returned, FALSE otherwise
+ bool MSWGetCreateWindowCoords(const wxPoint& pos,
+ const wxSize& size,
+ int& x, int& y,
+ int& w, int& h) const;
+
+ // get the HWND to be used as parent of this window with CreateWindow()
+ virtual WXHWND MSWGetParent() const;
+
+ // creates the window of specified Windows class with given style, extended
+ // style, title and geometry (default values
+ //
+ // returns TRUE if the window has been created, FALSE if creation failed
+ bool MSWCreate(const wxChar *wclass,
+ const wxChar *title = NULL,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ WXDWORD style = 0,