X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2432b92dd7a837db13d3938a56c1959decd03203..a737331db68b754c8bf31fa0a15f6d1f207b40bf:/src/msw/nativdlg.cpp diff --git a/src/msw/nativdlg.cpp b/src/msw/nativdlg.cpp index 120ecad6b1..a99be6dbf8 100644 --- a/src/msw/nativdlg.cpp +++ b/src/msw/nativdlg.cpp @@ -58,7 +58,7 @@ bool wxWindow::LoadNativeDialog(wxWindow* parent, wxWindowID& id) if (hWndNext) child = CreateWindowFromHWND(this, (WXHWND) hWndNext); - while (hWndNext != NULL) + while (hWndNext != (HWND) NULL) { hWndNext = ::GetWindow(hWndNext, GW_HWNDNEXT); if (hWndNext) @@ -139,9 +139,13 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd) #else #ifdef UNICODE GetClassNameW((HWND) hWnd, buf, 256); +#else +#ifdef __TWIN32__ + GetClassName((HWND) hWnd, buf, 256); #else GetClassNameA((HWND) hWnd, buf, 256); #endif +#endif #endif wxString str(buf); @@ -224,7 +228,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd) { win = new wxScrollBar; } -#if defined(__WIN95__) +#if defined(__WIN95__) && !defined(__TWIN32__) else if (str == "MSCTLS_UPDOWN32") { win = new wxSpinButton;