HDC dc = GetWindowDC(hwnd);
HFONT oldFont = 0;
if (GetFont() && GetFont()->GetResourceHandle())
- oldFont = ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle());
+ oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle());
GetTextMetrics(dc, &lpTextMetric);
SIZE extentXY;
HDC dc = GetWindowDC(hwnd);
HFONT oldFont = 0;
if (GetFont() && GetFont()->GetResourceHandle())
- oldFont = ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle());
+ oldFont = (HFONT) ::SelectObject(dc, (HFONT) GetFont()->GetResourceHandle());
GetTextMetrics(dc, &lpTextMetric);
int i;
void wxListBox::SetString(int N, const wxString& s)
{
- int sel = GetSelection();
+ int sel = -1;
+ if (!(m_windowStyle & wxLB_MULTIPLE) && !(m_windowStyle & wxLB_EXTENDED))
+ sel = GetSelection();
char *oldData = (char *)wxListBox::GetClientData(N);