Click here to Skip to main content
16,016,750 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Why BSTR conversion not working Pin
Christian Graus30-May-05 12:05
protectorChristian Graus30-May-05 12:05 
GeneralRe: Why BSTR conversion not working Pin
S. Senthil Kumar30-May-05 20:33
S. Senthil Kumar30-May-05 20:33 
GeneralRe: Why BSTR conversion not working Pin
Christian Graus31-May-05 10:59
protectorChristian Graus31-May-05 10:59 
GeneralRe: Why BSTR conversion not working Pin
S. Senthil Kumar31-May-05 17:17
S. Senthil Kumar31-May-05 17:17 
GeneralRe: Why BSTR conversion not working Pin
S. Senthil Kumar30-May-05 19:57
S. Senthil Kumar30-May-05 19:57 
GeneralBode diagram Pin
alvarillo30-May-05 7:39
alvarillo30-May-05 7:39 
GeneralRe: Bode diagram Pin
Ravi Bhavnani30-May-05 7:55
professionalRavi Bhavnani30-May-05 7:55 
GeneralCComboBox & MSVS .NET 2003 Pin
oldbayray30-May-05 6:13
oldbayray30-May-05 6:13 
Hello all,

I'm currently encountering a frustrating nuance (bug?) when trying to use comboboxes in MFC applications in visual studio. Basically I do this:
- go through the project wizard, create a dialog application, using MFC in a static library
- create a combobox in the dialog view (I set sort to true) note: i use the style 'drop list'
- add combobox as a control variable to the dialog
- create a simple button which calls InsertString or AddString on the just-created combobox variable.
- Run app (debug or release, doesn't seem to matter)
- Combobox after having InsertString and/or AddString called looks empty like this:
http://img248.echo.cx/img248/530/brokencombobox2yj.jpg

Notice it appears empty even after calling AddString. However, interestingly if i call SetCurSel(0) after AddString the entry in index 0 appears, but none of the other added entries do.


So I'm quite interested and frustrated to find out what is going on here. I downloaded the demo project from:
http://codeproject.com/combobox/combobox_tut.asp, opened it in MSVS 2003 .NET, converted it, compiled, and lauched. Suprise, the droplist displays correctly.
See:
http://img248.echo.cx/img248/7476/workingdroplist4uh.jpg

However, if i modify the dialog of the combobox tutorial, create a new combobox, and a button that adds entries to it, it does not display correctly as previously shown.

Note that I do have MSVS 2002 and 2003 installed on my dev machine. However I'm not using an managed code so there is nothing being cross-referenced. I also have a laptop with only a copy of MSVS 2002 and all of this appears to be identical on there. Additionally on my brothers computer, which only has 2003 on it, it is the same.

Can anyone provide some insight as to what I'm missing, or what is going on here? I've tried everything from messing with project settings to manually editing resource files.
Please!
GeneralRe: CComboBox & MSVS .NET 2003 Pin
Jack Puppy30-May-05 6:57
Jack Puppy30-May-05 6:57 
GeneralRe: CComboBox & MSVS .NET 2003 Pin
oldbayray30-May-05 7:45
oldbayray30-May-05 7:45 
GeneralRe: CComboBox & MSVS .NET 2003 Pin
Ravi Bhavnani30-May-05 7:56
professionalRavi Bhavnani30-May-05 7:56 
GeneralRe: CComboBox & MSVS .NET 2003 Pin
Tom Archer30-May-05 11:29
Tom Archer30-May-05 11:29 
GeneralRe: CComboBox & MSVS .NET 2003 Pin
Ravi Bhavnani30-May-05 11:35
professionalRavi Bhavnani30-May-05 11:35 
GeneralRe: CComboBox & MSVS .NET 2003 Pin
Jack Puppy30-May-05 12:43
Jack Puppy30-May-05 12:43 
GeneralRe: CComboBox & MSVS .NET 2003 Pin
oldbayray30-May-05 12:52
oldbayray30-May-05 12:52 
GeneralRe: CComboBox & MSVS .NET 2003 Pin
oldbayray30-May-05 12:51
oldbayray30-May-05 12:51 
GeneralDisplay file!!! Pin
Anonymous30-May-05 5:41
Anonymous30-May-05 5:41 
GeneralRe: Display file!!! Pin
Tom Archer30-May-05 11:36
Tom Archer30-May-05 11:36 
QuestionHow to crop an image in an application based on dialog?(VC++6.0) Pin
qqworm30-May-05 4:43
qqworm30-May-05 4:43 
AnswerRe: How to crop an image in an application based on dialog?(VC++6.0) Pin
Christian Graus30-May-05 12:06
protectorChristian Graus30-May-05 12:06 
Questionwhat is the proper way to OnInitDialog? Pin
IlanTal30-May-05 4:42
IlanTal30-May-05 4:42 
AnswerRe: what is the proper way to OnInitDialog? Pin
Jack Puppy30-May-05 7:01
Jack Puppy30-May-05 7:01 
GeneralMFC CMonthCalCtrl problem Pin
Ivan Cachicatari30-May-05 4:26
Ivan Cachicatari30-May-05 4:26 
GeneralState images in CTreeCtrl Pin
MarcosEdu30-May-05 4:16
MarcosEdu30-May-05 4:16 
QuestionHow to run background processes in my application? Pin
Mystic Valour30-May-05 3:35
Mystic Valour30-May-05 3:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.