1) minor modifications in fileconf.cpp
2) new MSW function (private.h): wxGetWindowText() which works with wxString instead of (horror) fixed size buffers. All calls to ::GetWindowText() should be replaced with this! 3) remains of casts to float in different wxControl classes removed, (EDIT|BUTTON)_HEIGHT_FROM_CHAR_HEIGHT macros introduced (could be made inline functions as well...) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -125,24 +125,22 @@ void wxStaticBox::SetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
GetSize(&w1, &h1);
|
||||
}
|
||||
|
||||
char buf[300];
|
||||
|
||||
int current_width;
|
||||
|
||||
int cx;
|
||||
int cy;
|
||||
int cyf;
|
||||
|
||||
HWND button = (HWND)m_hWnd;
|
||||
wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
|
||||
|
||||
GetWindowText(button, buf, 300);
|
||||
GetTextExtent(buf, ¤t_width, &cyf,NULL,NULL,GetFont());
|
||||
if (w1 < 0)
|
||||
w1 = (int)(current_width + 3*cx) ;
|
||||
if (h1<0)
|
||||
h1 = (int)(cyf*EDIT_CONTROL_FACTOR) ;
|
||||
MoveWindow(button, x1, y1, w1, h1, TRUE);
|
||||
GetTextExtent(wxGetWindowText(m_hWnd), ¤t_width, &cyf,
|
||||
NULL,NULL,GetFont());
|
||||
if ( w1 < 0 )
|
||||
w1 = current_width + 3*cx;
|
||||
if ( h1 < 0 )
|
||||
h1 = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cyf);
|
||||
|
||||
MoveWindow((HWND)m_hWnd, x1, y1, w1, h1, TRUE);
|
||||
}
|
||||
|
||||
WXHBRUSH wxStaticBox::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||
|
Reference in New Issue
Block a user