原来是在工具栏中显现“线宽”组合框,代码如下:
nIndex = m_wndToolBar.CommandToIndex( ID_WB_TOOL_LINEWIDTH );
if( nIndex >=0 )
{
m_wndToolBar.SetButtonInfo( nIndex,ID_WB_TOOL_LINEWIDTH, TBBS_SEPARATOR, 40);
m_wndToolBar.GetItemRect( nIndex,&rect );
rect.bottom +=180;
if( !m_cmbLineWidth.Create( dwComboStyle|CBS_OWNERDRAWFIXED ,rect, &m_wndToolBar, ID_WB_TOOL_LINEWIDTH)){
TRACE(_TEXT("Failed to create linewidth combobox!\n"));
return -1;
}
m_cmbLineWidth.ShowWindow( SW_SHOW );
int nItem = m_cmbLineWidth.AddString( _TEXT(""));
m_cmbLineWidth.SetItemData( nItem, 1 );
nItem = m_cmbLineWidth.AddString( _TEXT(""));
m_cmbLineWidth.SetItemData( nItem, 2 );
nItem = m_cmbLineWidth.AddString( _TEXT(""));
m_cmbLineWidth.SetItemData( nItem, 3 );
nItem = m_cmbLineWidth.AddString( _TEXT(""));
m_cmbLineWidth.SetItemData( nItem, 4 );
nItem = m_cmbLineWidth.AddString( _TEXT(""));
m_cmbLineWidth.SetItemData( nItem, 6 );
nItem = m_cmbLineWidth.AddString( _TEXT(""));
m_cmbLineWidth.SetItemData( nItem, 8 );
nItem = m_cmbLineWidth.AddString( _TEXT(""));
m_cmbLineWidth.SetItemData( nItem, 10 );

m_cmbLineWidth.SetCurSel( 0 );
}
现在我想把它移到对话框m_DlgWbBar中,于是我创建了一个m_LineWith组合框,怎么把“线宽”显现在其中?谢谢!!