对菜单条附底色
下面的代码仅仅是给弹出的菜单填充颜色,窗体上的菜单条还是windows默认的菜单条颜色。
我不知道给窗体上菜单条填充颜色。主要是找到FillRect函数的前两个参数
希望哪位达人能帮个忙~
zDrawItemStruct tDrawItemStruct
uLong hdc
tagrect rTmp
CopyMemory(tDrawItemStruct,drawitemstruct,48)
hdc = tDrawItemStruct.hdc
rTmp = tDrawItemStruct.rcItem
//填充弹出菜单底色
hBrush = CreateSolidBrush(il_BKColor)
FillRect(hdc,ast_rect,hBrush)
DeleteObject(hBrush)
//填充弹出菜单左边框底色
rTmp.Left = ast_rect.Left
rTmp.top= ast_rect.top
rTmp.Right = ast_rect.Left+20
rTmp.bottom = ast_rect.bottom
hBrush = CreateSolidBrush(il_BKColor_L)
FillRect(hdc,rTmp,hBrush)
DeleteObject(hBrush)