mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Fixed the button label bug.
svn path=/trunk/; revision=6009
This commit is contained in:
parent
55f95cb4b1
commit
7bc7cff30d
1 changed files with 26 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: button.c,v 1.10 2003/09/07 13:16:55 ekohl Exp $
|
||||
/* $Id: button.c,v 1.11 2003/09/07 17:36:40 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS User32
|
||||
|
@ -137,7 +137,11 @@ inline static WCHAR *get_button_text( HWND hwnd )
|
|||
DbgPrint("[button] In get_button_text()\n");
|
||||
len = GetWindowTextLengthW( hwnd );
|
||||
buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) );
|
||||
if (buffer) GetWindowTextW( hwnd, buffer, len + 1 );
|
||||
if (buffer)
|
||||
{
|
||||
GetWindowTextW( hwnd, buffer, len );
|
||||
buffer[len] = 0;
|
||||
}
|
||||
DbgPrint("[button] TextLen %d Text = %s\n", len, buffer);
|
||||
return buffer;
|
||||
}
|
||||
|
@ -183,7 +187,7 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
|
|||
case WM_CREATE:
|
||||
DbgPrint("[button] WM_CREATE\n");
|
||||
|
||||
checkBoxWidth = 14;
|
||||
checkBoxWidth = 13;
|
||||
checkBoxHeight = 13;
|
||||
|
||||
if (btn_type >= MAX_BTN_TYPE)
|
||||
|
@ -542,12 +546,14 @@ static UINT BUTTON_CalcLabelRect(HWND hwnd, HDC hdc, RECT *rc)
|
|||
WCHAR *text;
|
||||
ICONINFO iconInfo;
|
||||
BITMAP bm;
|
||||
UINT dtStyle = BUTTON_BStoDT(style);
|
||||
UINT dtStyle;
|
||||
RECT r = *rc;
|
||||
INT n;
|
||||
|
||||
DbgPrint("[button] In BUTTON_CalcLabelRect()\n");
|
||||
style = GetWindowLongA( hwnd, GWL_STYLE );
|
||||
style = GetWindowLongW( hwnd, GWL_STYLE );
|
||||
|
||||
dtStyle = BUTTON_BStoDT(style);
|
||||
|
||||
/* Calculate label rectangle according to label type */
|
||||
switch (style & (BS_ICON|BS_BITMAP))
|
||||
|
|
Loading…
Reference in a new issue