且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

组合框的列表框不可见

更新时间:2023-11-28 19:30:10

我要添加的一件事:确保您已确定组合框的列表框的大小.您可以在资源编辑器中执行此操作,方法是单击组合框的下拉箭头,然后将底部中心的拖动点向下拖动.
One thing I would add: make sure you have sized the listbox of the combobox. You can do this in the resource editor by clicking on the dropdown arrow of the combobox, and then dragging the bottom center dragpoint down.


确保将可见"属性设置为真" "(如果您这样做的话,则不必显式调用ShowWindow()).在相关说明中,您可能不应该从InitDialog()调用事件处理程序.除此之外,您的代码应按原样工作...我假设m_ComboCComboBox对象,对吗?

还...
-确保您的资源仍然是IDC_COMBO(在浏览属性时,我已经无意中更改了此内容)
-在资源标头文件中,确保IDC_COMBO具有唯一编号(否则,您将获得各种奇怪的行为)
-您确实为对话框命名了CDialog以外的其他名称(只是确保确定)?
Make sure the "Visible" property is set to "True" (you don''t have to explicitly call ShowWindow() if you did it that way). On a related note, you probably shouldn''t call an event handler from InitDialog(). Other than that, your code should work as is... I''m assuming m_Combo is a CComboBox object right?

Also...
-Make sure your resource is still IDC_COMBO (I''ve changed this by accident before while looking through properties)
-In your resource header file, make sure IDC_COMBO has a unique number (otherwise you''ll get all sorts of odd behavior)
-You did name your dialog something other than CDialog right (just making sure)?