avoid using _WIN32_IE

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-08-02 23:26:30 +00:00
parent 0ed48c11ca
commit 5b59df8315
4 changed files with 22 additions and 22 deletions

View File

@ -636,12 +636,16 @@ bool wxListCtrl::GetColumn(int col, wxListItem& item) const
}
}
#if _WIN32_IE >= 0x0300
// the column images were not supported in older versions but how to check
// for this? we can't use _WIN32_IE because we always define it to a very
// high value, so see if another symbol which is only defined starting from
// comctl32.dll 4.70 is available
#ifdef NM_CUSTOMDRAW // _WIN32_IE >= 0x0300
if ( item.m_mask & wxLIST_MASK_IMAGE )
{
item.m_image = lvCol.iImage;
}
#endif
#endif // LVCOLUMN::iImage exists
return success;
}
@ -2066,9 +2070,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
}
break;
#if defined(_WIN32_IE) && _WIN32_IE >= 0x300 \
&& !( defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 1, 0 ) )
case NM_CUSTOMDRAW:
#ifdef NM_CUSTOMDRAW
*result = OnCustomDraw(lParam);
return TRUE;
@ -2109,13 +2111,13 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
wxStrncpy(lvi.pszText, text, lvi.cchTextMax);
}
#if defined(_WIN32_IE) && _WIN32_IE >= 0x300 \
&& !( defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 1, 1 ) )
// see comment at the end of wxListCtrl::GetColumn()
#ifdef NM_CUSTOMDRAW
if ( lvi.mask & LVIF_IMAGE )
{
lvi.iImage = OnGetItemImage(item);
}
#endif
#endif // NM_CUSTOMDRAW
// a little dose of healthy paranoia: as we never use
// LVM_SETCALLBACKMASK we're not supposed to get these ones
@ -2179,7 +2181,8 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
return processed;
}
#if defined(_WIN32_IE) && _WIN32_IE >= 0x300
// see comment at the end of wxListCtrl::GetColumn()
#ifdef NM_CUSTOMDRAW // _WIN32_IE >= 0x0300
WXLPARAM wxListCtrl::OnCustomDraw(WXLPARAM lParam)
{
@ -2641,8 +2644,8 @@ static void wxConvertToMSWListCol(int WXUNUSED(col), const wxListItem& item,
lvCol.cx = item.m_width;
}
#if defined(_WIN32_IE) && _WIN32_IE >= 0x300 \
&& !( defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 1, 1 ) )
// see comment at the end of wxListCtrl::GetColumn()
#ifdef NM_CUSTOMDRAW // _WIN32_IE >= 0x0300
if ( item.m_mask & wxLIST_MASK_IMAGE )
{
if ( wxTheApp->GetComCtl32Version() >= 470 )
@ -2652,7 +2655,7 @@ static void wxConvertToMSWListCol(int WXUNUSED(col), const wxListItem& item,
}
//else: it doesn't support item images anyhow
}
#endif
#endif // _WIN32_IE >= 0x0300
}
#endif // wxUSE_LISTCTRL

View File

@ -796,7 +796,7 @@ bool wxToolBar::Realize()
int left = -1;
// TB_SETBUTTONINFO message is only supported by comctl32.dll 4.71+
#if defined(_WIN32_IE) && (_WIN32_IE >= 0x400 )
#ifdef TB_SETBUTTONINFO
// available in headers, now check whether it is available now
// (during run-time)
if ( wxTheApp->GetComCtl32Version() >= 471 )

View File

@ -36,11 +36,6 @@
#include <commctrl.h>
#endif
#ifndef _WIN32_IE
// minimal set of features by default
#define _WIN32_IE 0x0200
#endif
// VZ: normally, the trick with subclassing the tooltip control and processing
// TTM_WINDOWFROMPOINT should work but, somehow, it doesn't. I leave the
// code here for now (but it's not compiled) in case we need it later.
@ -295,10 +290,10 @@ void wxToolTip::Add(WXHWND hWnd)
if ( index != wxNOT_FOUND )
{
#if _WIN32_IE >= 0x0300
#ifdef TTM_SETMAXTIPWIDTH
if ( wxTheApp->GetComCtl32Version() >= 470 )
{
// use TTM_SETMAXWIDTH to make tooltip multiline using the
// use TTM_SETMAXTIPWIDTH to make tooltip multiline using the
// extent of its first line as max value
HFONT hfont = (HFONT)SendTooltipMessage(GetToolTipCtrl(),
WM_GETFONT,

View File

@ -2543,7 +2543,9 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
}
break;
#if defined(_WIN32_IE) && _WIN32_IE >= 0x300 && !wxUSE_COMCTL32_SAFELY && !( defined(__GNUWIN32__) && !wxCHECK_W32API_VERSION( 1, 0 ) )
// instead of explicitly checking for _WIN32_IE, check if the
// required symbols are available in the headers
#if defined(CDDS_PREPAINT) && !wxUSE_COMCTL32_SAFELY
case NM_CUSTOMDRAW:
{
LPNMTVCUSTOMDRAW lptvcd = (LPNMTVCUSTOMDRAW)lParam;
@ -2638,7 +2640,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
// we always process it
return true;
#endif // _WIN32_IE >= 0x300
#endif // have owner drawn support in headers
case NM_CLICK:
{