Author: gadamopoulos
Date: Wed Apr 5 21:07:44 2017
New Revision: 74278
URL:
http://svn.reactos.org/svn/reactos?rev=74278&view=rev
Log:
[WIN32K] -Implement NtUserCalcMenuBar.
Modified:
trunk/reactos/win32ss/user/ntuser/menu.c
trunk/reactos/win32ss/user/ntuser/ntstubs.c
Modified: trunk/reactos/win32ss/user/ntuser/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.c…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] Wed Apr 5 21:07:44 2017
@@ -5288,6 +5288,54 @@
/*
* @implemented
*/
+/*
http://www.cyber-ta.org/releases/malware-analysis/public/SOURCES/b47155634c…
*/
+DWORD
+APIENTRY
+NtUserCalcMenuBar(
+ HWND hwnd,
+ DWORD leftBorder,
+ DWORD rightBorder,
+ DWORD top,
+ LPRECT prc )
+{
+ HDC hdc;
+ PWND Window;
+ RECT Rect;
+ DWORD ret;
+
+ UserEnterExclusive();
+
+ if(!(Window = UserGetWindowObject(hwnd)))
+ {
+ EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
+ UserLeave();
+ return 0;
+ }
+
+ hdc = UserGetDCEx(NULL, NULL, DCX_CACHE);
+ if (!hdc)
+ {
+ UserLeave();
+ return 0;
+ }
+
+ Rect.left = leftBorder;
+ Rect.right = Window->rcWindow.right - Window->rcWindow.left - rightBorder;
+ Rect.top = top;
+ Rect.bottom = 0;
+
+ ret = MENU_DrawMenuBar(hdc, &Rect, Window, TRUE);
+
+ UserReleaseDC( 0, hdc, FALSE );
+
+ UserLeave();
+
+ return ret;
+}
+
+/*
+ * @implemented
+ */
DWORD APIENTRY
NtUserCheckMenuItem(
HMENU hMenu,
Modified: trunk/reactos/win32ss/user/ntuser/ntstubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/ntstub…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/ntstubs.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/ntstubs.c [iso-8859-1] Wed Apr 5 21:07:44 2017
@@ -862,20 +862,6 @@
return 0;
}
-/*
http://www.cyber-ta.org/releases/malware-analysis/public/SOURCES/b47155634c…
*/
-DWORD
-APIENTRY
-NtUserCalcMenuBar(
- HWND hwnd,
- DWORD x,
- DWORD width, // Scale the edge thickness, offset?
- DWORD y,
- LPRECT prc )
-{
- ERR("hwnd %p, X %d, Width %d, Y %d, prc 0x%x\n",hwnd,x,width,y,prc);
- return 0;
-}
-
DWORD
APIENTRY
NtUserRemoteConnect(