Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7214fdfc
Commit
7214fdfc
authored
Apr 16, 2004
by
Ge van Geldorp
Committed by
Alexandre Julliard
Apr 16, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setup menu drawing colors before calling owner draw routine.
parent
9de14a1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
menu.c
controls/menu.c
+24
-24
No files found.
controls/menu.c
View file @
7214fdfc
...
...
@@ -1116,6 +1116,30 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
return
;
}
/* Setup colors */
if
(
lpitem
->
fState
&
MF_HILITE
)
{
if
(
menuBar
)
{
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_MENUTEXT
));
SetBkColor
(
hdc
,
GetSysColor
(
COLOR_MENU
));
}
else
{
if
(
lpitem
->
fState
&
MF_GRAYED
)
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_GRAYTEXT
));
else
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_HIGHLIGHTTEXT
));
SetBkColor
(
hdc
,
GetSysColor
(
COLOR_HIGHLIGHT
));
}
}
else
{
if
(
lpitem
->
fState
&
MF_GRAYED
)
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_GRAYTEXT
)
);
else
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_MENUTEXT
)
);
SetBkColor
(
hdc
,
GetSysColor
(
COLOR_MENU
)
);
}
if
(
lpitem
->
fType
&
MF_OWNERDRAW
)
{
/*
...
...
@@ -1195,30 +1219,6 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
}
}
/* Setup colors */
if
(
lpitem
->
fState
&
MF_HILITE
)
{
if
(
menuBar
)
{
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_MENUTEXT
));
SetBkColor
(
hdc
,
GetSysColor
(
COLOR_MENU
));
}
else
{
if
(
lpitem
->
fState
&
MF_GRAYED
)
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_GRAYTEXT
));
else
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_HIGHLIGHTTEXT
));
SetBkColor
(
hdc
,
GetSysColor
(
COLOR_HIGHLIGHT
));
}
}
else
{
if
(
lpitem
->
fState
&
MF_GRAYED
)
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_GRAYTEXT
)
);
else
SetTextColor
(
hdc
,
GetSysColor
(
COLOR_MENUTEXT
)
);
SetBkColor
(
hdc
,
GetSysColor
(
COLOR_MENU
)
);
}
/* helper lines for debugging */
/* FrameRect(hdc, &rect, GetStockObject(BLACK_BRUSH));
SelectObject( hdc, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) );
...
...
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