Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9caa6baf
Commit
9caa6baf
authored
Jan 14, 2003
by
Robert Shearman
Committed by
Alexandre Julliard
Jan 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move internal implementation into the exported function
DrawMenuBarTemp.
parent
bda22de5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
46 deletions
+68
-46
menu.c
controls/menu.c
+68
-46
No files found.
controls/menu.c
View file @
9caa6baf
...
...
@@ -177,6 +177,7 @@ static BOOL fEndMenu = FALSE;
static
LRESULT
WINAPI
PopupMenuWndProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
);
DWORD
WINAPI
DrawMenuBarTemp
(
HWND
hwnd
,
HDC
hDC
,
LPRECT
lprect
,
HMENU
hMenu
,
HFONT
hFont
);
/*********************************************************************
* menu class descriptor
...
...
@@ -1515,63 +1516,29 @@ UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd,
BOOL
suppress_draw
)
{
LPPOPUPMENU
lppop
;
UINT
i
,
retvalue
;
HFONT
hfontOld
=
0
;
HMENU
hMenu
=
GetMenu
(
hwnd
);
lppop
=
MENU_GetMenu
(
hMenu
);
if
(
lppop
==
NULL
||
lprect
==
NULL
)
{
retvalue
=
GetSystemMetrics
(
SM_CYMENU
);
goto
END
;
return
GetSystemMetrics
(
SM_CYMENU
);
}
TRACE
(
"(%p, %p, %p)
\n
"
,
hDC
,
lprect
,
lppop
);
hfontOld
=
SelectObject
(
hDC
,
hMenuFont
);
if
(
lppop
->
Height
==
0
)
MENU_MenuBarCalcSize
(
hDC
,
lprect
,
lppop
,
hwnd
);
lprect
->
bottom
=
lprect
->
top
+
lppop
->
Height
;
if
(
suppress_draw
)
{
retvalue
=
lppop
->
Height
;
goto
END
;
}
hfontOld
=
SelectObject
(
hDC
,
hMenuFont
);
FillRect
(
hDC
,
lprect
,
GetSysColorBrush
(
COLOR_MENU
)
);
if
(
lppop
->
Height
==
0
)
MENU_MenuBarCalcSize
(
hDC
,
lprect
,
lppop
,
hwnd
);
if
(
TWEAK_WineLook
==
WIN31_LOOK
)
{
SelectObject
(
hDC
,
SYSCOLOR_GetPen
(
COLOR_WINDOWFRAME
)
);
MoveToEx
(
hDC
,
lprect
->
left
,
lprect
->
bottom
,
NULL
);
LineTo
(
hDC
,
lprect
->
right
,
lprect
->
bottom
);
}
else
{
SelectObject
(
hDC
,
SYSCOLOR_GetPen
(
COLOR_3DFACE
));
MoveToEx
(
hDC
,
lprect
->
left
,
lprect
->
bottom
,
NULL
);
LineTo
(
hDC
,
lprect
->
right
,
lprect
->
bottom
);
}
if
(
lppop
->
nItems
==
0
)
{
retvalue
=
GetSystemMetrics
(
SM_CYMENU
);
goto
END
;
}
lprect
->
bottom
=
lprect
->
top
+
lppop
->
Height
;
for
(
i
=
0
;
i
<
lppop
->
nItems
;
i
++
)
{
MENU_DrawMenuItem
(
hwnd
,
hMenu
,
hwnd
,
hDC
,
&
lppop
->
items
[
i
],
lppop
->
Height
,
TRUE
,
ODA_DRAWENTIRE
);
if
(
hfontOld
)
SelectObject
(
hDC
,
hfontOld
);
return
lppop
->
Height
;
}
retvalue
=
lppop
->
Height
;
END:
if
(
hfontOld
)
SelectObject
(
hDC
,
hfontOld
);
return
retvalue
;
else
return
DrawMenuBarTemp
(
hwnd
,
hDC
,
lprect
,
hMenu
,
NULL
);
}
...
...
@@ -3861,10 +3828,65 @@ BOOL WINAPI DrawMenuBar( HWND hWnd )
*
* Not 100% sure about the param names, but close.
*/
DWORD
WINAPI
DrawMenuBarTemp
(
HWND
someHWND
,
HDC
someHDC
,
LPRECT
someRECT
,
HMENU
someHMENU
,
HFONT
someFONT
)
DWORD
WINAPI
DrawMenuBarTemp
(
HWND
hwnd
,
HDC
hDC
,
LPRECT
lprect
,
HMENU
hMenu
,
HFONT
hFont
)
{
FIXME
(
"(%p, %p, %p, %p, %p): stub
\n
"
,
someHWND
,
someHDC
,
someRECT
,
someHMENU
,
someFONT
);
return
0
;
LPPOPUPMENU
lppop
;
UINT
i
,
retvalue
;
HFONT
hfontOld
=
0
;
if
(
!
hMenu
)
hMenu
=
GetMenu
(
hwnd
);
if
(
!
hFont
)
hFont
=
hMenuFont
;
lppop
=
MENU_GetMenu
(
hMenu
);
if
(
lppop
==
NULL
||
lprect
==
NULL
)
{
retvalue
=
GetSystemMetrics
(
SM_CYMENU
);
goto
END
;
}
TRACE
(
"(%p, %p, %p, %p, %p)
\n
"
,
hwnd
,
hDC
,
lprect
,
hMenu
,
hFont
);
hfontOld
=
SelectObject
(
hDC
,
hFont
);
if
(
lppop
->
Height
==
0
)
MENU_MenuBarCalcSize
(
hDC
,
lprect
,
lppop
,
hwnd
);
lprect
->
bottom
=
lprect
->
top
+
lppop
->
Height
;
FillRect
(
hDC
,
lprect
,
GetSysColorBrush
(
COLOR_MENU
)
);
if
(
TWEAK_WineLook
==
WIN31_LOOK
)
{
SelectObject
(
hDC
,
SYSCOLOR_GetPen
(
COLOR_WINDOWFRAME
)
);
MoveToEx
(
hDC
,
lprect
->
left
,
lprect
->
bottom
,
NULL
);
LineTo
(
hDC
,
lprect
->
right
,
lprect
->
bottom
);
}
else
{
SelectObject
(
hDC
,
SYSCOLOR_GetPen
(
COLOR_3DFACE
));
MoveToEx
(
hDC
,
lprect
->
left
,
lprect
->
bottom
,
NULL
);
LineTo
(
hDC
,
lprect
->
right
,
lprect
->
bottom
);
}
if
(
lppop
->
nItems
==
0
)
{
retvalue
=
GetSystemMetrics
(
SM_CYMENU
);
goto
END
;
}
for
(
i
=
0
;
i
<
lppop
->
nItems
;
i
++
)
{
MENU_DrawMenuItem
(
hwnd
,
hMenu
,
hwnd
,
hDC
,
&
lppop
->
items
[
i
],
lppop
->
Height
,
TRUE
,
ODA_DRAWENTIRE
);
}
retvalue
=
lppop
->
Height
;
END:
if
(
hfontOld
)
SelectObject
(
hDC
,
hfontOld
);
return
retvalue
;
}
/***********************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment