谢谢!
解决方案 »
- windows8出来对现在学windows程序设计有影响么
- 为什么NM_LISTVIEW的iItem总是-1
- 内存释放问题
- debug版和release版在程序运行时候有什么区别吗?
- 在Report形式下修改CListCtrl的的列名称
- 傻傻的问什么是控制台程序--是DOS程序吗?
- 一个奇怪的对话框(重赏之下,必有勇夫)
- CListCtrl怎样用在线编辑一个item中的一个subitem
- 在家靠父母,出门靠朋友,大家来看看,顺手帮个忙
- 虚拟驱动器的原理是什么,有谁想告?
- 为何我的CView拦截不到我的自定义消息?
- 我想在IE中嵌入ACTIVE的控件,这个控件是一些图形象丙图,条形图,波形图...怎么做
GetDlgItem(IDC_COMBO1)->MoveWindow(0,0,100,500);
就行了
CString str;
CSize sz;
int dx=0;
CDC* pDC = pmyComboBox->GetDC();
for (int i=0;i < pmyComboBox->GetCount();i++)
{
pmyComboBox->GetLBText( i, str );
sz = pDC->GetTextExtent(str); if (sz.cx > dx)
dx = sz.cx;
}
pmyComboBox->ReleaseDC(pDC);// Adjust the width for the vertical scroll bar and the left and right border.
dx += ::GetSystemMetrics(SM_CXVSCROLL) + 2*::GetSystemMetrics(SM_CXEDGE);// Set the width of the list box so that every item is completely visible.
pmyComboBox->SetDroppedWidth(dx);