Author: cwittich
Date: Tue Apr 17 15:27:42 2007
New Revision: 26370
URL:
http://svn.reactos.org/svn/reactos?rev=26370&view=rev
Log:
implemented DrawCaptionTempA/W
(NtUserDrawCaptionTemp is still missing)
Modified:
trunk/reactos/dll/win32/user32/windows/nonclient.c
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
Modified: trunk/reactos/dll/win32/user32/windows/nonclient.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/n…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/nonclient.c (original)
+++ trunk/reactos/dll/win32/user32/windows/nonclient.c Tue Apr 17 15:27:42 2007
@@ -1102,13 +1102,13 @@
}
/*
- * @unimplemented
+ * @implemented
*/
BOOL
STDCALL
DrawCaptionTempW(
- HWND hwnd,
- HDC hdc,
+ HWND hWnd,
+ HDC hDC,
const RECT *rect,
HFONT hFont,
HICON hIcon,
@@ -1116,12 +1116,11 @@
UINT uFlags
)
{
- UNIMPLEMENTED;
- return FALSE;
+ return NtUserDrawCaptionTemp(hWnd, hDC, rect, hFont, hIcon, str, uFlags);
}
/*
- * @unimplemented
+ * @implemented
*/
BOOL
STDCALL
@@ -1135,8 +1134,21 @@
UINT uFlags
)
{
- UNIMPLEMENTED;
- return FALSE;
+ LPWSTR strW;
+ INT len;
+ BOOL ret = FALSE;
+
+ if (!(uFlags & DC_TEXT) || !str)
+ return DrawCaptionTempW(hwnd, hdc, rect, hFont, hIcon, NULL, uFlags);
+
+ len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
+ if ((strW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
+ {
+ MultiByteToWideChar(CP_ACP, 0, str, -1, strW, len );
+ ret = DrawCaptionTempW(hwnd, hdc, rect, hFont, hIcon, strW, uFlags);
+ HeapFree(GetProcessHeap(), 0, strW);
+ }
+ return ret;
}
/***********************************************************************
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h Tue Apr 17 15:27:42 2007
@@ -716,16 +716,16 @@
LPCRECT lpRc,
UINT uFlags);
-DWORD
+BOOL
STDCALL
NtUserDrawCaptionTemp(
- DWORD Unknown0,
- DWORD Unknown1,
- DWORD Unknown2,
- DWORD Unknown3,
- DWORD Unknown4,
- DWORD Unknown5,
- DWORD Unknown6);
+ HWND hWnd,
+ HDC hDC,
+ const RECT *rect,
+ HFONT hFont,
+ HICON hIcon,
+ LPCWSTR str,
+ UINT uFlags);
BOOL
NTAPI
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/ntstubs.c Tue Apr 17 15:27:42 2007
@@ -180,20 +180,19 @@
return 0;
}
-DWORD
+BOOL
STDCALL
NtUserDrawCaptionTemp(
- DWORD Unknown0,
- DWORD Unknown1,
- DWORD Unknown2,
- DWORD Unknown3,
- DWORD Unknown4,
- DWORD Unknown5,
- DWORD Unknown6)
-{
- UNIMPLEMENTED
-
- return 0;
+ HWND hWnd,
+ HDC hDC,
+ const RECT *rect,
+ HFONT hFont,
+ HICON hIcon,
+ LPCWSTR str,
+ UINT uFlags)
+{
+ UNIMPLEMENTED
+ return FALSE;
}
BOOL