- // 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,
- WXDWORD exendedStyle = 0);
- virtual bool MSWCommand(WXUINT param, WXWORD id);
-
-#if WXWIN_COMPATIBILITY
- wxObject *GetChild(int number) const;
- virtual void MSWDeviceToLogical(float *x, float *y) const;
-#endif // WXWIN_COMPATIBILITY
-
- // Create an appropriate wxWindow from a HWND
- virtual wxWindow* CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd);
-
- // Make sure the window style reflects the HWND style (roughly)
- virtual void AdoptAttributesFromHWND();
-
- // Setup background and foreground colours correctly
- virtual void SetupColours();
-
- // ------------------------------------------------------------------------
- // helpers for message handlers: these perform the same function as the
- // message crackers from <windowsx.h> - they unpack WPARAM and LPARAM into
- // the correct parameters
- // ------------------------------------------------------------------------
-
- void UnpackCommand(WXWPARAM wParam, WXLPARAM lParam,
- WXWORD *id, WXHWND *hwnd, WXWORD *cmd);
- void UnpackActivate(WXWPARAM wParam, WXLPARAM lParam,
- WXWORD *state, WXWORD *minimized, WXHWND *hwnd);
- void UnpackScroll(WXWPARAM wParam, WXLPARAM lParam,
- WXWORD *code, WXWORD *pos, WXHWND *hwnd);
- void UnpackCtlColor(WXWPARAM wParam, WXLPARAM lParam,
- WXWORD *nCtlColor, WXHDC *hdc, WXHWND *hwnd);
- void UnpackMenuSelect(WXWPARAM wParam, WXLPARAM lParam,
- WXWORD *item, WXWORD *flags, WXHMENU *hmenu);
-
- // ------------------------------------------------------------------------
- // internal handlers for MSW messages: all handlers return a boolen value:
- // TRUE means that the handler processed the event and FALSE that it didn't
- // ------------------------------------------------------------------------
-
- // there are several cases where we have virtual functions for Windows
- // message processing: this is because these messages often require to be
- // processed in a different manner in the derived classes. For all other
- // messages, however, we do *not* have corresponding MSWOnXXX() function
- // and if the derived class wants to process them, it should override
- // MSWWindowProc() directly.
-
- // scroll event (both horizontal and vertical)
- virtual bool MSWOnScroll(int orientation, WXWORD nSBCode,
- WXWORD pos, WXHWND control);
-
- // child control notifications
-#ifdef __WIN95__
- virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
-#endif // __WIN95__
-
- // owner-drawn controls need to process these messages
- virtual bool MSWOnDrawItem(int id, WXDRAWITEMSTRUCT *item);
- virtual bool MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *item);
-
- // the rest are not virtual
- bool HandleCreate(WXLPCREATESTRUCT cs, bool *mayCreate);
- bool HandleInitDialog(WXHWND hWndFocus);
- bool HandleDestroy();
-
- bool HandlePaint();
- bool HandleEraseBkgnd(WXHDC pDC);
-
- bool HandleMinimize();
- bool HandleMaximize();
- bool HandleSize(int x, int y, WXUINT flag);
- bool HandleGetMinMaxInfo(void *mmInfo);
-
- bool HandleShow(bool show, int status);
- bool HandleActivate(int flag, bool minimized, WXHWND activate);
-
- bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
- bool HandleSysCommand(WXWPARAM wParam, WXLPARAM lParam);
-
- bool HandleCtlColor(WXHBRUSH *hBrush,
- WXHDC hdc,
- WXHWND hWnd,
- WXUINT nCtlColor,
- WXUINT message,
- WXWPARAM wParam,
- WXLPARAM lParam);
-
- bool HandlePaletteChanged(WXHWND hWndPalChange);
- bool HandleQueryNewPalette();
- bool HandleSysColorChange();
-
- bool HandleQueryEndSession(long logOff, bool *mayEnd);
- bool HandleEndSession(bool endSession, long logOff);
-
- bool HandleSetFocus(WXHWND wnd);
- bool HandleKillFocus(WXHWND wnd);
-
- bool HandleDropFiles(WXWPARAM wParam);
-
- bool HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags);
- bool HandleMouseMove(int x, int y, WXUINT flags);
-
- bool HandleChar(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE);
- bool HandleKeyDown(WXWORD wParam, WXLPARAM lParam);
- bool HandleKeyUp(WXWORD wParam, WXLPARAM lParam);
-
- bool HandleQueryDragIcon(WXHICON *hIcon);
-
- bool HandleSetCursor(WXHWND hWnd, short nHitTest, int mouseMsg);
-
- // Window procedure
- virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
-
- // Calls an appropriate default window procedure
- virtual long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
- virtual bool MSWProcessMessage(WXMSG* pMsg);
- virtual bool MSWTranslateMessage(WXMSG* pMsg);
- virtual void MSWDestroyWindow();
-
- // Detach "Window" menu from menu bar so it doesn't get deleted
- void MSWDetachWindowMenu();
-
- // this function should return the brush to paint the window background
- // with or 0 for the default brush
- virtual WXHBRUSH OnCtlColor(WXHDC hDC,
- WXHWND hWnd,
- WXUINT nCtlColor,
- WXUINT message,
- WXWPARAM wParam,
- WXLPARAM lParam);
-
-#if WXWIN_COMPATIBILITY
- void SetShowing(bool show) { (void)Show(show); }
- bool IsUserEnabled() const { return IsEnabled(); }
-#endif // WXWIN_COMPATIBILITY