need help with ComboBox (C++, Dialog)

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2004
Posts: 12
Reputation: ohnbabygal is an unknown quantity at this point 
Solved Threads: 0
ohnbabygal ohnbabygal is offline Offline
Newbie Poster

need help with ComboBox (C++, Dialog)

 
0
  #1
Mar 16th, 2005
hi

im writin a simple GUI project usin C++ (Dialog). i have an input file with a list of foods. my goal is to display the list of foods in a ComboBox and then Add some new food and Delete some.
But i just cant put the list to a ComboBox (dropdown list style). i used addString method. it didnt work. can anybody just tell me the steps to add a list to a ComboBox using C++?
Thanks
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 15
Reputation: steveh is an unknown quantity at this point 
Solved Threads: 0
steveh steveh is offline Offline
Newbie Poster

Re: need help with ComboBox (C++, Dialog)

 
0
  #2
Mar 17th, 2005
Originally Posted by ohnbabygal
hi

im writin a simple GUI project usin C++ (Dialog). i have an input file with a list of foods. my goal is to display the list of foods in a ComboBox and then Add some new food and Delete some.
But i just cant put the list to a ComboBox (dropdown list style). i used addString method. it didnt work. can anybody just tell me the steps to add a list to a ComboBox using C++?
Thanks
Do you have a variable of type control? In other words, it would be a variable defined something like as CComboBox m_Box. If you have a vaiable like this, you can use AddString. That would look like m_Box.AddString(...) in an MFC application.
You can, of course, also have a CString variable associated with the edit box part of the control. Then it would just be a matter of grabbing the CString variable and adding it to the list with AddString.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 12
Reputation: ohnbabygal is an unknown quantity at this point 
Solved Threads: 0
ohnbabygal ohnbabygal is offline Offline
Newbie Poster

Re: need help with ComboBox (C++, Dialog)

 
0
  #3
Mar 17th, 2005
Originally Posted by steveh
Do you have a variable of type control? In other words, it would be a variable defined something like as CComboBox m_Box. If you have a vaiable like this, you can use AddString. That would look like m_Box.AddString(...) in an MFC application.
You can, of course, also have a CString variable associated with the edit box part of the control. Then it would just be a matter of grabbing the CString variable and adding it to the list with AddString.
thanks. now i have the list in the combobox, BUT the list doesnt come down when i hit down arrow. i am trying to use m_combo.create but i dont know what parameters i should use, for example .. CWnd *PparentWnd.
or is there any way i can make the combobox to drop the list when i hit down arrow?
thanks in advance.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1
Reputation: arunkg999 is an unknown quantity at this point 
Solved Threads: 0
arunkg999 arunkg999 is offline Offline
Newbie Poster

Re: need help with ComboBox (C++, Dialog)

 
0
  #4
Jul 8th, 2005
Originally Posted by ohnbabygal
thanks. now i have the list in the combobox, BUT the list doesnt come down when i hit down arrow. i am trying to use m_combo.create but i dont know what parameters i should use, for example .. CWnd *PparentWnd.
or is there any way i can make the combobox to drop the list when i hit down arrow?
thanks in advance.
=======================

what u need to do is during the design time itself after placing the combobox, then click on the arrow. u will see a rectangle box in the background , then drag it , to wahtever lenght u need to use, start using it and enjoy coding.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC