]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listbox.cpp
Added validation support
[wxWidgets.git] / src / msw / listbox.cpp
index afd8c76827d15323143d3cccb0e4c202048f1bf6..8eac8338fa9b1aa16ac1ac22cb26807edc546da8 100644 (file)
@@ -484,6 +484,8 @@ void wxListBox::SetSize(int x, int y, int width, int height, int sizeFlags)
   if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
     y1 = currentY;
 
+  AdjustForParentClientOrigin(x1, y1, sizeFlags);
+
   // If we're prepared to use the existing size, then...
   if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO))
   {
@@ -539,7 +541,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
     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;
@@ -560,7 +562,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
     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;