Question about using CComboBox Control??Thank you 
Author Message
 Question about using CComboBox Control??Thank you

i used a CComboBox Control,
call
CComboBox m_List;

BOOL CDlg::OnInitDialog()
{
 CDialog::OnInitDialog();
 UpdateData(true);
 m_List.AddString("test");
 UpdateData(false);

Quote:
}

But the String is still cannot added to the Combox why?
How to solve it??Thank you


Thu, 10 Jun 2004 17:35:11 GMT  
 Question about using CComboBox Control??Thank you
Have you subclassed your combobox?

--
Ajay Kalra [MVP - VC++]

Note: Please post all replies to newsgroup only.


Quote:
> i used a CComboBox Control,
> call
> CComboBox m_List;

> BOOL CDlg::OnInitDialog()
> {
>  CDialog::OnInitDialog();
>  UpdateData(true);
>  m_List.AddString("test");
>  UpdateData(false);
> }

> But the String is still cannot added to the Combox why?
> How to solve it??Thank you



Thu, 10 Jun 2004 18:01:37 GMT  
 Question about using CComboBox Control??Thank you
yes, i did it already


Thu, 10 Jun 2004 20:42:58 GMT  
 Question about using CComboBox Control??Thank you
One of my first rules, which seems to be (in spite of numerous observations made by others
in the newsgroup) an excellent metric of reliability: if there is a call on UpdateData
coded explicitly by the programmer, the dialog is probably broken. It is not clear what
the use of UpdateData is in this context anyway, since adding the strings to the combo box
has nothing to do with the mechanisms of UpdateData. You are probably the victim of
failing to size the combo box dropdown, a common error. What I suggest doing is using
something like my CSmartDropdown class, available on my MVP Tips site, which automatically
resizes the combo box so you never again have to consider this a problem. Otherwise, you
need to explicitly resize the dropdown area in the dialog editor.
                                joe

Quote:

>i used a CComboBox Control,
>call
>CComboBox m_List;

>BOOL CDlg::OnInitDialog()
>{
> CDialog::OnInitDialog();
> UpdateData(true);
> m_List.AddString("test");
> UpdateData(false);
>}

>But the String is still cannot added to the Combox why?
>How to solve it??Thank you

Joseph M. Newcomer [MVP]

Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm


Thu, 10 Jun 2004 22:35:54 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Program Freezes when using CComboBox Control with Property Page

2. Question about using ADO to connect Oracle DB??Thank you

3. Question about using Oracle Client to connect Oracle 9i DB (window version)?Thank you

4. Question about using CRecordset again?Thank

5. Question about using CDatabase and CRecordset, thank you

6. CComboBox control question

7. Question about CComboBox Control

8. Question about use Date Time Picker Control??thank you

9. Question about use Date Time Picker Control??thank you

10. Question about Splash Screen control in VC++?thank you

11. Composite Control using rich edit control question

12. VB has Control.Visual(false) to hide a Control, then how about VC++??Thank you

 

 
Powered by phpBB® Forum Software