Populating a ComboBox
-
Hello everyone, I m trying to populate my Combobox but i m not successfull as yet. as usuall I have enetred the data in properties DATA tab of ComboBox I tryed with insertstring and additem method also but nothing is working.At runtime my ComboBox expands blankly it does not show any data Thanx, namy.:(
namy
namy31 wrote:
as usuall I have enetred the data in properties DATA tab of ComboBox
If you have entered string there, it should be semicolon(
;
) separated.Prasad Notifier using ATL | Operator new[],delete[][^]
-
namy31 wrote:
as usuall I have enetred the data in properties DATA tab of ComboBox
If you have entered string there, it should be semicolon(
;
) separated.Prasad Notifier using ATL | Operator new[],delete[][^]
No semicolon is required. :confused:
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
-
Hello everyone, I m trying to populate my Combobox but i m not successfull as yet. as usuall I have enetred the data in properties DATA tab of ComboBox I tryed with insertstring and additem method also but nothing is working.At runtime my ComboBox expands blankly it does not show any data Thanx, namy.:(
namy
namy31 wrote:
I tryed with insertstring and additem method...
What value are they returning?
namy31 wrote:
it does not show any data
Exactly how are you verifying this?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
-
No semicolon is required. :confused:
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
DavidCrow wrote:
No semicolon is required.
In original post, he mentioned setting data using
DATA
field in properties window. There you have to insert data (;
) separated. Let's say I want to display three items added initialy viz. "tom","dick" and "harry", you can add it inDATA
field with (;
) as separator; as "tom;dick;harry
"Prasad Notifier using ATL | Operator new[],delete[][^]
-
DavidCrow wrote:
No semicolon is required.
In original post, he mentioned setting data using
DATA
field in properties window. There you have to insert data (;
) separated. Let's say I want to display three items added initialy viz. "tom","dick" and "harry", you can add it inDATA
field with (;
) as separator; as "tom;dick;harry
"Prasad Notifier using ATL | Operator new[],delete[][^]
prasad_som wrote:
There you have to insert data (;) separated.
No you don't. Each item goes on a separate line. No semicolon is required. This is in the context of VC++ v6.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
-
I have used this as well as the other one bellow not at same time definitely char *names[3]; names[0] = "Joe"; names[1] = "Billy"; names[2] = "Bob"; for(int i=0;i<=2;i++) m_ctrldestcombobox.AddString((LPCTSTR)names[i]); ***************************************************************** m_ctrldestcombobox.InsertString(1, "SAP R/3"); m_ctrldestcombobox.InsertString(2, "PLM SERVER"); thanx pls reply even if i m acting foolishly
I tested your code it was working,did you check return value of AddString what return value?
_**
**_
WhiteSky
-
namy31 wrote:
I tryed with insertstring and additem method...
What value are they returning?
namy31 wrote:
it does not show any data
Exactly how are you verifying this?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
In my initdialog function I m using these function controls r initialized here for veryfying I just need to run my programm where I see the form I have created all other controls work fine but my conbobox shows no contents on clicking right corner it just expands to the designed size but doesnot show anythig Thanx for such quick and guiding responses namy1
-
prasad_som wrote:
There you have to insert data (;) separated.
No you don't. Each item goes on a separate line. No semicolon is required. This is in the context of VC++ v6.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
Ohh ! I was talking in VS 2005 context. :)
Prasad Notifier using ATL | Operator new[],delete[][^]
-
In my initdialog function I m using these function controls r initialized here for veryfying I just need to run my programm where I see the form I have created all other controls work fine but my conbobox shows no contents on clicking right corner it just expands to the designed size but doesnot show anythig Thanx for such quick and guiding responses namy1
Is the combobox "tall" enough? The default height is way too small.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Is the combobox "tall" enough? The default height is way too small.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Yes its quite long to accomodate atleast two items bcoz right now i m trying to display 2 items only is there ne way to send attachments i would send u the screen shots thanx namy1
Try sending them to davidcrow(at)peoplepc.com.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb