在主窗口里 switch (message) { case WM_DRAWITEM: } 就可以了啊~~
在windows主窗口回调里拦截不到此消息,怎么处理呀。谢谢捧场
The WM_DRAWITEM message is sent to the owner window of an owner-drawn button, combo box, list box, or menu when a visual aspect of the button, combo box, list box, or menu has changed
不用控件,怎么得到WM_DRAWITEM? The WM_DRAWITEM message is sent to the owner window of an owner-drawn button, combo box, list box, or menu when a visual aspect of the button, combo box, list box, or menu has changed
switch (message)
{
case WM_DRAWITEM:
}
就可以了啊~~
myButton.Create(_T("My button"),
WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON|BS_OWNERDRAW, //BS_OWNERDRAW
CRect(10,10,100,30), pParentWnd, 1);pmyListBox->Create(
WS_CHILD|WS_VISIBLE|WS_BORDER|WS_HSCROLL|WS_VSCROLL|
LBS_SORT|LBS_MULTIPLESEL|LBS_OWNERDRAWVARIABLE, //LBS_OWNERDRAWVARIABLE
myRect, pParentWnd, 1);其他支持控件也要有这个样式。
The WM_DRAWITEM message is sent to the owner window of an owner-drawn button, combo box, list box, or menu when a visual aspect of the button, combo box, list box, or menu has changed
请问我如何设置菜单自画风格。
已经可以了!!!:)