#pragma interface "window.h"
#endif
-#include "wx/msw/winundef.h"
+// #include "wx/msw/winundef.h"
// VZ: apparently some version of Windows send extra mouse move messages after
// a mouse click. My tests under NT 4.0 and 95 didn't show it so I'm
const wxFont *theFont = (const wxFont *) NULL)
const;
- virtual bool PopupMenu( wxMenu *menu, int x, int y );
+ virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE );
virtual void OnDefaultAction(wxControl * WXUNUSED(initiatingItem)) { }
#endif // WXWIN_COMPATIBILITY
-#if wxUSE_CARET
+#if wxUSE_CARET && WXWIN_COMPATIBILITY
// caret manipulation (old MSW only functions, see wxCaret class for the
// new API)
void CreateCaret(int w, int h);
void OnEraseBackground(wxEraseEvent& event);
void OnIdle(wxIdleEvent& event);
- // a window may have a default button
- // TODO move into wxPanel and/or wxFrame
- wxButton *GetDefaultItem() const { return m_btnDefault; }
- void SetDefaultItem(wxButton *btn) { m_btnDefault = btn; }
-
public:
// For implementation purposes - sometimes decorations make the client area
// smaller
// returns TRUE if the window has been created
bool MSWCreate(int id,
wxWindow *parent,
- const char *wclass,
+ const wxChar *wclass,
wxWindow *wx_win,
- const char *title,
+ const wxChar *title,
int x, int y, int width, int height,
WXDWORD style,
- const char *dialog_template = NULL,
+ const wxChar *dialog_template = NULL,
WXDWORD exendedStyle = 0);
virtual bool MSWCommand(WXUINT param, WXWORD id);
bool HandleSysCommand(WXWPARAM wParam, WXLPARAM lParam);
bool HandleCtlColor(WXHBRUSH *hBrush,
- WXHDC hdc,
- WXHWND hWnd,
- WXUINT nCtlColor,
- WXUINT message,
- WXWPARAM wParam,
- WXLPARAM lParam);
+ WXHDC hdc,
+ WXHWND hWnd,
+ WXUINT nCtlColor,
+ WXUINT message,
+ WXWPARAM wParam,
+ WXLPARAM lParam);
bool HandlePaletteChanged(WXHWND hWndPalChange);
bool HandleQueryNewPalette();
WXHMENU m_hMenu; // Menu, if any
- wxButton *m_btnDefault;
+ // the return value of WM_GETDLGCODE handler
+ long m_lDlgCode;
// implement the base class pure virtuals
virtual void DoClientToScreen( int *x, int *y ) const;
int sizeFlags = wxSIZE_AUTO);
virtual void DoSetClientSize(int width, int height);
+ // get the size which best suits the window: e.g., for a static text it
+ // will be the width and height of the text
+ virtual wxSize DoGetBestSize();
+
#if wxUSE_TOOLTIPS
virtual void DoSetToolTip( wxToolTip *tip );
#endif // wxUSE_TOOLTIPS