mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
user32: sync icontitle.c with Wine 1.1.13
Alexandre Julliard <julliard@winehq.org> user32: Store the builtin class names in Unicode. Rob Shearman <rob@codeweavers.com> user32: Fix incorrect character count passed to GetWindowTextW in ICONTITLE_Paint. svn path=/trunk/; revision=38856
This commit is contained in:
parent
1c2bcd0d06
commit
51d20d699d
1 changed files with 7 additions and 7 deletions
|
@ -15,7 +15,7 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <user32.h>
|
#include <user32.h>
|
||||||
|
@ -37,7 +37,7 @@ static LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPAR
|
||||||
*/
|
*/
|
||||||
const struct builtin_class_descr ICONTITLE_builtin_class =
|
const struct builtin_class_descr ICONTITLE_builtin_class =
|
||||||
{
|
{
|
||||||
ICONTITLE_CLASS_ATOM, /* name */
|
(LPCWSTR)ICONTITLE_CLASS_ATOM, /* name */
|
||||||
0, /* style */
|
0, /* style */
|
||||||
NULL, /* procA (winproc is Unicode only) */
|
NULL, /* procA (winproc is Unicode only) */
|
||||||
IconTitleWndProc, /* procW */
|
IconTitleWndProc, /* procW */
|
||||||
|
@ -60,11 +60,11 @@ HWND ICONTITLE_Create( HWND owner )
|
||||||
|
|
||||||
if (!IsWindowEnabled(owner)) style |= WS_DISABLED;
|
if (!IsWindowEnabled(owner)) style |= WS_DISABLED;
|
||||||
if( GetWindowLongA( owner, GWL_STYLE ) & WS_CHILD )
|
if( GetWindowLongA( owner, GWL_STYLE ) & WS_CHILD )
|
||||||
hWnd = CreateWindowExA( 0, ICONTITLE_CLASS_ATOM, NULL,
|
hWnd = CreateWindowExA( 0, (LPCSTR)ICONTITLE_CLASS_ATOM, NULL,
|
||||||
style | WS_CHILD, 0, 0, 1, 1,
|
style | WS_CHILD, 0, 0, 1, 1,
|
||||||
GetParent(owner), 0, instance, NULL );
|
GetParent(owner), 0, instance, NULL );
|
||||||
else
|
else
|
||||||
hWnd = CreateWindowExA( 0, ICONTITLE_CLASS_ATOM, NULL,
|
hWnd = CreateWindowExA( 0, (LPCSTR)ICONTITLE_CLASS_ATOM, NULL,
|
||||||
style, 0, 0, 1, 1,
|
style, 0, 0, 1, 1,
|
||||||
owner, 0, instance, NULL );
|
owner, 0, instance, NULL );
|
||||||
WIN_SetOwner( hWnd, owner ); /* MDI depends on this */
|
WIN_SetOwner( hWnd, owner ); /* MDI depends on this */
|
||||||
|
@ -175,7 +175,7 @@ static BOOL ICONTITLE_Paint( HWND hwnd, HWND owner, HDC hDC, BOOL bActive )
|
||||||
{
|
{
|
||||||
WCHAR buffer[80];
|
WCHAR buffer[80];
|
||||||
|
|
||||||
INT length = GetWindowTextW( owner, buffer, sizeof(buffer) );
|
INT length = GetWindowTextW( owner, buffer, sizeof(buffer)/sizeof(buffer[0]) );
|
||||||
SetTextColor( hDC, textColor );
|
SetTextColor( hDC, textColor );
|
||||||
SetBkMode( hDC, TRANSPARENT );
|
SetBkMode( hDC, TRANSPARENT );
|
||||||
|
|
||||||
|
@ -222,8 +222,8 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg,
|
||||||
if (wParam) ICONTITLE_SetTitlePos( hWnd, owner );
|
if (wParam) ICONTITLE_SetTitlePos( hWnd, owner );
|
||||||
return 0;
|
return 0;
|
||||||
case WM_ERASEBKGND:
|
case WM_ERASEBKGND:
|
||||||
if( GetWindowLongA( owner, GWL_STYLE ) & WS_CHILD )
|
if( GetWindowLongW( owner, GWL_STYLE ) & WS_CHILD )
|
||||||
lParam = SendMessageA( owner, WM_ISACTIVEICON, 0, 0 );
|
lParam = SendMessageW( owner, WM_ISACTIVEICON, 0, 0 );
|
||||||
else
|
else
|
||||||
lParam = (owner == GetActiveWindow());
|
lParam = (owner == GetActiveWindow());
|
||||||
if( ICONTITLE_Paint( hWnd, owner, (HDC)wParam, (BOOL)lParam ) )
|
if( ICONTITLE_Paint( hWnd, owner, (HDC)wParam, (BOOL)lParam ) )
|
||||||
|
|
Loading…
Reference in a new issue