VC++ 5 compatibility

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2004-12-20 09:24:55 +00:00
parent 028e7716ef
commit 6305fabeeb

View File

@ -621,7 +621,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
int existingExtent = (int)SendMessage(GetHwnd(), LB_GETHORIZONTALEXTENT, 0, 0L);
HDC dc = GetWindowDC(GetHwnd());
HFONT oldFont = 0;
if (GetFont().Ok() && GetFont().GetResourceHandle())
if (GetFont().Ok() && GetFont().GetResourceHandle() != 0)
oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont().GetResourceHandle());
GetTextMetrics(dc, &lpTextMetric);
@ -641,7 +641,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
int largestExtent = 0;
HDC dc = GetWindowDC(GetHwnd());
HFONT oldFont = 0;
if (GetFont().Ok() && GetFont().GetResourceHandle())
if (GetFont().Ok() && GetFont().GetResourceHandle() != 0)
oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont().GetResourceHandle());
GetTextMetrics(dc, &lpTextMetric);