// global functions
// ---------------------------------------------------------------------------
-extern wxWindow *wxWndHook;
extern LONG APIENTRY _EXPORT wxDlgProc(HWND hWnd, UINT message,
WPARAM wParam, LPARAM lParam);
bool wxWindow::LoadNativeDialog(wxWindow* parent, wxWindowID& id)
{
m_windowId = id;
- wxWndHook = this;
+
+ wxWindowCreationHook hook(this);
m_hWnd = (WXHWND)::CreateDialog((HINSTANCE)wxGetInstance(),
MAKEINTRESOURCE(id),
parent ? (HWND)parent->GetHWND() : 0,
(DLGPROC) wxDlgProc);
- wxWndHook = NULL;
if ( !m_hWnd )
return FALSE;
{
SetName(name);
- wxWndHook = this;
+ wxWindowCreationHook hook(this);
m_hWnd = (WXHWND)::CreateDialog((HINSTANCE) wxGetInstance(),
name.c_str(),
parent ? (HWND)parent->GetHWND() : 0,
(DLGPROC)wxDlgProc);
- wxWndHook = NULL;
if ( !m_hWnd )
return FALSE;
}
else
{
- wxLogError(wxT("Don't know what kind of button this is: id = %d"),
+ wxLogError(wxT("Don't know what kind of button this is: id = %ld"),
id);
}
}
win = new wxSpinButton;
}
#endif
+#if wxUSE_SLIDER
else if (str == wxT("MSCTLS_TRACKBAR32"))
{
// Need to ascertain if it's horiz or vert
win = new wxSlider;
}
+#endif // wxUSE_SLIDER
else if (str == wxT("STATIC"))
{
int style1 = (style & 0xFF);