// a better solution should be found later...
#define wxUSE_MOUSEEVENT_HACK 0
-#include "wx/hash.h"
-
-// pseudo-template HWND <-> wxWindow hash table
-WX_DECLARE_HASH(wxWindow, wxWindowList, wxWinHashTable);
-
-extern wxWinHashTable *wxWinHandleHash;
-
// ---------------------------------------------------------------------------
// constants
// ---------------------------------------------------------------------------
class WXDLLEXPORT wxWindowMSW : public wxWindowBase
{
public:
- wxWindowMSW();
+ wxWindowMSW() { Init(); }
wxWindowMSW(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
- const wxString& name = wxPanelNameStr);
+ const wxString& name = wxPanelNameStr)
+ {
+ Init();
+ Create(parent, id, pos, size, style, name);
+ }
virtual ~wxWindowMSW();
bool HandleSetCursor(WXHWND hWnd, short nHitTest, int mouseMsg);
// Window procedure
- virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
+ virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
// Calls an appropriate default window procedure
- virtual long MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
+ virtual WXLRESULT MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
// message processing helpers
// list of disabled children before last call to our Disable()
wxWindowList *m_childrenDisabled;
+ // number of calls to Freeze() minus number of calls to Thaw()
+ unsigned int m_frozenness;
+
DECLARE_DYNAMIC_CLASS(wxWindowMSW)
DECLARE_NO_COPY_CLASS(wxWindowMSW)
DECLARE_EVENT_TABLE()
// ---------------------------------------------------------------------------
// kbd code translation
-WXDLLEXPORT int wxCharCodeMSWToWX(int keySym);
+WXDLLEXPORT int wxCharCodeMSWToWX(int keySym, WXLPARAM lParam = 0);
WXDLLEXPORT int wxCharCodeWXToMSW(int id, bool *IsVirtual);
// window creation helper class: before creating a new HWND, instantiate an
~wxWindowCreationHook();
};
+// ----------------------------------------------------------------------------
+// global objects
+// ----------------------------------------------------------------------------
+
+// notice that this hash must be defined after wxWindow declaration as it
+// needs to "see" its dtor and not just forward declaration
+#include "wx/hash.h"
+
+// pseudo-template HWND <-> wxWindow hash table
+WX_DECLARE_HASH(wxWindow, wxWindowList, wxWinHashTable);
+
+extern wxWinHashTable *wxWinHandleHash;
+
#endif
// _WX_WINDOW_H_