wxWindow::GetBestSize() added

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-11-19 21:01:20 +00:00
parent 33879bb218
commit f68586e51b
61 changed files with 378 additions and 221 deletions

View File

@@ -1257,12 +1257,6 @@ void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
DoMoveWindow(x, y, width, height);
}
// for a generic window there is no natural best size - just use the current one
wxSize wxWindow::DoGetBestSize()
{
return GetSize();
}
void wxWindow::DoSetClientSize(int width, int height)
{
wxWindow *parent = GetParent();
@@ -3353,7 +3347,7 @@ bool wxWindow::MSWOnScroll(int orientation, WXWORD wParam,
// global functions
// ===========================================================================
void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font)
void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont *the_font)
{
TEXTMETRIC tm;
HDC dc = ::GetDC((HWND) wnd);
@@ -3363,7 +3357,7 @@ void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font)
{
// the_font->UseResource();
// the_font->RealizeResource();
fnt = (HFONT)the_font->GetResourceHandle();
fnt = (HFONT)((wxFont *)the_font)->GetResourceHandle(); // const_cast
if ( fnt )
was = (HFONT) SelectObject(dc,fnt);
}