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:
@@ -321,7 +321,7 @@ void wxTextCtrl::SetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
|
||||
wxGetCharSize(GetHWND(), &cx, &cy,GetFont());
|
||||
|
||||
float control_width, control_height, control_x, control_y;
|
||||
int control_width, control_height, control_x, control_y;
|
||||
|
||||
// If we're prepared to use the existing size, then...
|
||||
if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO))
|
||||
@@ -333,17 +333,17 @@ void wxTextCtrl::SetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
if (w1<=0)
|
||||
w1 = DEFAULT_ITEM_WIDTH;
|
||||
|
||||
control_x = (float)x1;
|
||||
control_y = (float)y1;
|
||||
control_width = (float)w1;
|
||||
control_height = (float)h1;
|
||||
control_x = x1;
|
||||
control_y = y1;
|
||||
control_width = w1;
|
||||
control_height = h1;
|
||||
|
||||
// Calculations may have made text size too small
|
||||
if (control_height <= 0)
|
||||
control_height = (float)(int)(cy*EDIT_CONTROL_FACTOR) ;
|
||||
control_height = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
|
||||
|
||||
if (control_width <= 0)
|
||||
control_width = (float)DEFAULT_ITEM_WIDTH;
|
||||
control_width = DEFAULT_ITEM_WIDTH;
|
||||
|
||||
MoveWindow((HWND) GetHWND(), (int)control_x, (int)control_y,
|
||||
(int)control_width, (int)control_height, TRUE);
|
||||
|
Reference in New Issue
Block a user