X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2432b92dd7a837db13d3938a56c1959decd03203..0a3d0d1157ba147a11f0387e95f8c871baeea315:/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;