X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/44c4a3348693414bace13852e50d926c1aa9f08b..ba681060f36767a2682b8547871af2c6f8159955:/src/msw/nativdlg.cpp diff --git a/src/msw/nativdlg.cpp b/src/msw/nativdlg.cpp index f59657cefd..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); @@ -169,7 +173,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd) { win = new wxRadioButton; } -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(BS_BITMAP) else if (style & BS_BITMAP) { // TODO: how to find the bitmap? @@ -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; @@ -241,7 +245,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd) if ((style1 == SS_LEFT) || (style1 == SS_RIGHT) || (style1 == SS_SIMPLE)) win = new wxStaticText; -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(BS_BITMAP) else if (style1 == SS_BITMAP) { win = new wxStaticBitmap;