I would like to start by saying thanks to everyone who takes some time to view this thread and try to help.
I have a owner drawn popup menu, with submenu, which is also owner drawn.
When I run the code the following effect happens:
When I hover with mouse over submenu's item, his background becomes white , and the arrow ( the one that indicates that submenu has items ) turns into white arrow.
My question is:
How do I change the color of that marker ( let it be red for example ) ?
Some code example/ pseudo-code / instructions / tutorials / links ... would be welcome.
UPDATE #4:
***********************************************************************************************
Fixed the problem of white background appearing behind text by using
ExtTextOut()
with style
ETO_OPAQUE
.
Arrow is still white.
I can highlight item properly with following code in WM_DRAWITEM:
if( lpdis->itemAction & ODA_SELECT )
{
if(lpdis->itemState & ODS_SELECTED)
{
SetBkColor( lpdis->hDC, RGB(117, 210, 255) );
ExtTextOut( lpdis->hDC, lpdis->rcItem.left,
lpdis->rcItem.top, ETO_OPAQUE, &lpdis->rcItem,
(LPCWSTR)lpdis->itemData,
wcslen((LPCWSTR)lpdis->itemData), NULL);
DrawEdge( lpdis->hDC, &lpdis->rcItem, EDGE_RAISED,
BF_FLAT );
FrameRect( lpdis->hDC, &lpdis->rcItem,
CreateSolidBrush( RGB(117, 210, 255) ) );
}
}
***********************************************************************************************
I work in MS Visual Studio Express 2008, on Windows XP, in C++, using
pure WIN32 API.
If any other information is required ( source code or something similar ), please ask for it, I will more than gladly supply it.