]> git.saurik.com Git - wxWidgets.git/commitdiff
Compilation fixes for VC6 after MSWGetComboBoxInfo() introduction.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 18 Nov 2012 00:14:37 +0000 (00:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 18 Nov 2012 00:14:37 +0000 (00:14 +0000)
Don't use COMBOBOXINFO outside of WINVER checks, we can only use
tagCOMBOBOXINFO that we forward declared ourselves.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/choice.cpp
src/msw/combobox.cpp

index 3add1a764c0e8ebb8f713d59fff6d77724907414..e7c17023c1c48bf52a43ffbc02ca669de32bebd3 100644 (file)
@@ -200,12 +200,12 @@ wxChoice::~wxChoice()
     Clear();
 }
 
-bool wxChoice::MSWGetComboBoxInfo(COMBOBOXINFO* info) const
+bool wxChoice::MSWGetComboBoxInfo(tagCOMBOBOXINFO* info) const
 {
     // TODO-Win9x: Get rid of this once we officially drop support for Win9x
     //             and just call the function directly.
 #if wxUSE_DYNLIB_CLASS
-    typedef BOOL (WINAPI *GetComboBoxInfo_t)(HWND, COMBOBOXINFO*);
+    typedef BOOL (WINAPI *GetComboBoxInfo_t)(HWND, tagCOMBOBOXINFO*);
     static GetComboBoxInfo_t s_pfnGetComboBoxInfo = NULL;
     static bool s_triedToLoad = false;
     if ( !s_triedToLoad )
index 578e110be3e3d2b741e4800cbeb53024806cb1a2..dc91cfb2524dd2d6af5b4a03fc6e84dcc263912a 100644 (file)
@@ -377,9 +377,13 @@ bool wxComboBox::MSWShouldPreProcessMessage(WXMSG *pMsg)
 
 WXHWND wxComboBox::GetEditHWNDIfAvailable() const
 {
+    // FIXME-VC6: Only VC6 needs this guard, see WINVER definition in
+    //            include/wx/msw/wrapwin.h
+#if defined(WINVER) && WINVER >= 0x0500
     WinStruct<COMBOBOXINFO> info;
     if ( MSWGetComboBoxInfo(&info) )
         return info.hwndItem;
+#endif // WINVER >= 0x0500
 
     if (HasFlag(wxCB_SIMPLE))
     {