CToolBar m_wndDrawPropertyBar;
ComboBox m_wndDrawLineTypeComboBox;
CRect rect;
//创建线型下拉列表框
m_wndDrawPropertyBar.GetItemRect(2/*ComboBox在ToolBar中的位置,从0开始*/, &rect);
rect.bottom = rect.top + 100;
if (!m_wndDrawLineTypeComboBox.Create(CBS_DROPDOWNLIST|WS_VISIBLE |WS_TABSTOP|
WS_VSCROLL|CBS_OWNERDRAWVARIABLE,rect,&m_wndDrawPropertyBar,ID_DRAW_LINETYPE))
{
TRACE0("Failed to create lineType_Combobox\n");
return FALSE;
}
ComboBox m_wndDrawLineTypeComboBox;
CRect rect;
//创建线型下拉列表框
m_wndDrawPropertyBar.GetItemRect(2/*ComboBox在ToolBar中的位置,从0开始*/, &rect);
rect.bottom = rect.top + 100;
if (!m_wndDrawLineTypeComboBox.Create(CBS_DROPDOWNLIST|WS_VISIBLE |WS_TABSTOP|
WS_VSCROLL|CBS_OWNERDRAWVARIABLE,rect,&m_wndDrawPropertyBar,ID_DRAW_LINETYPE))
{
TRACE0("Failed to create lineType_Combobox\n");
return FALSE;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货