本文介绍了组合框的列表框不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好!
希望对您有所帮助:)!
请考虑以下代码(我认为这足以理解我的问题,但我最终可以添加其他代码行):
Hi everybody!
I hope in your help:)!
Please, consider following code (I think it''s adequate for understanding my problem but I can eventually add other lines of code):
void CDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_COMBO, m_Combo);
DDX_CBIndex(pDX, IDC_COMBO, m_ComboValue);
}
BOOL CDialog::OnInitDialog()
{
CDialog::OnInitDialog();
m_Combo.ShowWindow(SW_SHOW);
FromMMToDlg();
return TRUE;
}
void CDialog::FromMMToDlg()
{
m_Combo.AddString("aaaa");
m_Combo.AddString("bbbb");
OnSelchangeCombo();
}
BEGIN_MESSAGE_MAP(CDialog, CDialog)
ON_CBN_SELCHANGE(IDC_COMBO, OnSelchangeCombo)
END_MESSAGE_MAP()
void CDialog::OnSelchangeCombo()
{
UpdateData(TRUE);
switch(m_ComboValue)
{
case 0:
// Part A
break;
case 1:
// Part B
break;
}
}
组合框的类型"是拖放列表",组合框的所有者画图"是否".
为什么我无法使组合框的列表框可见?
谢谢!
Sergio
The Combobox "Type" is "Drop List" and the Combobox "Owner Draw" is "No".
Why am not I able to made list box of the combobox visible?
Thanks!
Sergio
推荐答案
这篇关于组合框的列表框不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!