You are not giving us much info. What does AddString return? What do
you mean by "doesn't seem to work"?
Your OnInitDialog should contain a call to CDialog::OnInitDialog. Try
putting your code after that call.
If it still doesn't work there could be something wrong with the way you
set up your cmb variable. It should be a member variable of type
CComboBox. It should be connected to the control by a line of code like
this, which should have been added automatically in DoDataExchange:
DDX_Control(pDX, IDC_COMBO1, cmb);
--
Scott McPhillips [VC++ MVP]
Visual Studio 2005 does this automatticly. So the code is just like you
described. I tested some examples and they don't work too.
How can anybody help you? - You still have not given us any information.
What does AddString return? What error or symptom do you get? Do
other controls work?
azsx:
"Doesn't seem to work" is not an adequate description of the problem.
David Wilkinson
azsx:
Maybe you need to increase the height of the combo in the resource editor?
David Wilkinson
Tom
"azsx" <radu_p...@yahoo.com> wrote in message
news:1162285006.5...@m73g2000cwd.googlegroups.com...
VS2005 does not have this problem. I had tested it earlier. IIRC, you
see all the strings you add. I think it auto adjusts the height. So I
am not sure how OP has resolved this issue by changing the height in
resource editor.
---
Ajay
Why was it not working though as VS2005 does not have this issue?
--
Ajay Kalra [MVP - VC++]
ajay...@yahoo.com
Tom
"azsx" <radu_p...@yahoo.com> wrote in message
news:1162481132.5...@i42g2000cwa.googlegroups.com...
What I found was that it auto adjusting to the number of items in it. I
am guessing its some style or something.
---
Ajay
Tom
"Ajay Kalra" <ajay...@yahoo.com> wrote in message
news:1162514156.4...@i42g2000cwa.googlegroups.com...
I added items at run time as well as design time and it seems to be
auto adjusting. I tried only with 3-4 items. Its far better than
previous versions.
---
Ajay