]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed warnings after GetFont prototype change
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 24 Jun 2004 14:25:47 +0000 (14:25 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 24 Jun 2004 14:25:47 +0000 (14:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/private.h
src/msw/button.cpp
src/msw/listbox.cpp
src/msw/radiobox.cpp
src/msw/slider95.cpp
src/msw/slidrmsw.cpp
src/msw/spinctrl.cpp
src/msw/statbox.cpp
src/msw/textctrl.cpp
src/msw/tglbtn.cpp
src/msw/window.cpp

index 31954e87c2a8c38b7e2488fa6784fc4c5f796dae..02c754a486afe7a703ababf562394d887bb338e1 100644 (file)
@@ -493,7 +493,7 @@ WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
 extern HCURSOR wxGetCurrentBusyCursor();    // from msw/utils.cpp
 extern const wxCursor *wxGetGlobalCursor(); // from msw/cursor.cpp
 
-WXDLLEXPORT void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont *the_font);
+WXDLLEXPORT void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFontthe_font);
 WXDLLEXPORT void wxFillLogFont(LOGFONT *logFont, const wxFont *font);
 WXDLLEXPORT wxFont wxCreateFontFromLogFont(const LOGFONT *logFont);
 WXDLLEXPORT wxFontEncoding wxGetFontEncFromCharSet(int charset);
index d0c52ac1947251c7e276bf572c0c5711ac112abd..06e356af658a4369e7ad98d7c09d845cea529b54 100644 (file)
@@ -203,7 +203,7 @@ wxSize wxButton::DoGetBestSize() const
     GetTextExtent(wxGetWindowText(GetHWND()), &wBtn, NULL);
 
     int wChar, hChar;
-    wxGetCharSize(GetHWND(), &wChar, &hChar, &GetFont());
+    wxGetCharSize(GetHWND(), &wChar, &hChar, GetFont());
 
     // add a margin -- the button is wider than just its label
     wBtn += 3*wChar;
index 35d90639e5cafda2d9205126a9f91a1a8a8e59c4..b3037577bcb79b00323587bf9bfec87f66f7511e 100644 (file)
@@ -682,7 +682,7 @@ wxSize wxListBox::DoGetBestSize() const
 
     // the listbox should be slightly larger than the widest string
     int cx, cy;
-    wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
+    wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
 
     wListbox += 3*cx;
 
index 1c2feaa680c47bf9cb8fbd9a2873477d11380312..4b8f7161b9b043cd672cbbe28d6749b09637a284 100644 (file)
@@ -466,7 +466,7 @@ wxSize wxRadioBox::GetTotalButtonSize(const wxSize& sizeBtn) const
 {
     // the radiobox should be big enough for its buttons
     int cx1, cy1;
-    wxGetCharSize(m_hWnd, &cx1, &cy1, &GetFont());
+    wxGetCharSize(m_hWnd, &cx1, &cy1, GetFont());
 
     int extraHeight = cy1;
 
@@ -525,7 +525,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
 #endif
 
     int cx1, cy1;
-    wxGetCharSize(m_hWnd, &cx1, &cy1, GetFont());
+    wxGetCharSize(m_hWnd, &cx1, &cy1, GetFont());
 
     // Attempt to have a look coherent with other platforms: We compute the
     // biggest toggle dim, then we align all items according this value.
index 36e29a5da77c329abc84bdc7265be72379b96b0f..da8c466e9632f0ac9339b789922c957e107c4727 100644 (file)
@@ -469,7 +469,7 @@ void wxSlider95::DoSetSize(int x, int y, int width, int height, int sizeFlags)
     int cy;
     int cyf;
 
-    wxGetCharSize(GetHWND(), &cx, &cy, this->GetFont());
+    wxGetCharSize(GetHWND(), &cx, &cy, this->GetFont());
 
     if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
     {
@@ -633,7 +633,7 @@ wxSize wxSlider95::DoGetBestSize() const
     int min_len = 0;
     int max_len = 0;
     
-    wxGetCharSize(GetHWND(), &cx, &cy, this->GetFont());
+    wxGetCharSize(GetHWND(), &cx, &cy, this->GetFont());
     
     if ( !HasFlag(wxSL_VERTICAL))
     {
index 48cfaf922abbf1559a4171afb0f10aee82c016b4..d91a39733acaecaf072d289edc618abbf81dced0 100644 (file)
@@ -349,7 +349,7 @@ void wxSliderMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
   int cy;
   int cyf;
 
-  wxGetCharSize(GetHWND(), &cx, &cy,& this->GetFont());
+  wxGetCharSize(GetHWND(), &cx, &cy, this->GetFont());
 
   if ((m_windowStyle & wxSL_VERTICAL) != wxSL_VERTICAL)
   {
index a0be1e83d4143b9a3e5ee9c68009ab846c95de7b..36396bf241f62fd0d3c096c2a3f06e71450d5946 100644 (file)
@@ -378,7 +378,7 @@ bool wxSpinCtrl::Create(wxWindow *parent,
     if ( sizeText.y <= 0 )
     {
         int cx, cy;
-        wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
+        wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
 
         sizeText.y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
     }
@@ -526,7 +526,7 @@ wxSize wxSpinCtrl::DoGetBestSize() const
     sizeBtn.x += DEFAULT_ITEM_WIDTH + MARGIN_BETWEEN;
 
     int y;
-    wxGetCharSize(GetHWND(), NULL, &y, &GetFont());
+    wxGetCharSize(GetHWND(), NULL, &y, GetFont());
     y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(y);
 
     // JACS: we should always use the height calculated
index 646fd625679e1af574359daefc249bd31dc71a6b..2edf27b718e6baba6233d49cc87c1538d39522bc 100644 (file)
@@ -143,7 +143,7 @@ bool wxStaticBox::Create(wxWindow *parent,
 wxSize wxStaticBox::DoGetBestSize() const
 {
     int cx, cy;
-    wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
+    wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
 
     int wBox;
     GetTextExtent(wxGetWindowText(m_hWnd), &wBox, &cy);
index 25e2ec905550b32288ebcfd4fa70cfc1e1322165..6c52d71047c041246ce640496a3b6d163ac72c91 100644 (file)
@@ -1932,7 +1932,7 @@ bool wxTextCtrl::AcceptsFocus() const
 wxSize wxTextCtrl::DoGetBestSize() const
 {
     int cx, cy;
-    wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
+    wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
 
     int wText = DEFAULT_ITEM_WIDTH;
 
index 02f1fc0f425d364493813da59dcb6d809696516d..352e727c77feecf022a382efe835346b3fc77261 100644 (file)
@@ -117,7 +117,7 @@ wxSize wxToggleButton::DoGetBestSize() const
    GetTextExtent(label, &wBtn, NULL);
 
    int wChar, hChar;
-   wxGetCharSize(GetHWND(), &wChar, &hChar, &GetFont());
+   wxGetCharSize(GetHWND(), &wChar, &hChar, GetFont());
 
    // add a margin - the button is wider than just its label
    wBtn += 3*wChar;
index d7eb2be6f5502a7df3e37bd683fae8790770a63c..51552987e4ad223da7c3d9c81c029f3f612eef8e 100644 (file)
@@ -4887,22 +4887,21 @@ bool wxWindowMSW::MSWOnScroll(int orientation, WXWORD wParam,
 // global functions
 // ===========================================================================
 
-void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont *the_font)
+void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFontthe_font)
 {
     TEXTMETRIC tm;
     HDC dc = ::GetDC((HWND) wnd);
     HFONT fnt =0;
     HFONT was = 0;
-    if ( the_font )
-    {
-        //    the_font->UseResource();
-        //    the_font->RealizeResource();
-        fnt = (HFONT)((wxFont *)the_font)->GetResourceHandle(); // const_cast
-        if ( fnt )
-            was = (HFONT) SelectObject(dc,fnt);
-    }
+        
+    //    the_font.UseResource();
+    //    the_font.RealizeResource();
+    fnt = (HFONT)the_font.GetResourceHandle(); // const_cast
+    if ( fnt )
+        was = (HFONT) SelectObject(dc,fnt);
+    
     GetTextMetrics(dc, &tm);
-    if ( the_font && fnt && was )
+    if ( fnt && was )
     {
         SelectObject(dc,was);
     }
@@ -4913,8 +4912,7 @@ void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont *the_font)
     if ( y )
         *y = tm.tmHeight + tm.tmExternalLeading;
 
-    //  if ( the_font )
-    //    the_font->ReleaseResource();
+    //   the_font.ReleaseResource();
 }
 
 // Returns 0 if was a normal ASCII value, not a special key. This indicates that