Sign in to follow this  

WIN C++ Combo box problem

This topic is 3855 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on a program which retrieves the graphics adapter name and displays it in a combo box. I'm using the Unicode character set so I've had to WCHAR some vars from char. I've ended up with a lot of garbage text. Obviously this is indicating some sort of problem using Unicode. Just wondering if it's a straight forward problem. It's kind of hard to post the code because there are DLL's involced and very large DX enumeration classes. I've spent a few days looking through it all and wouldn't wish it on anyone else.

Share this post


Link to post
Share on other sites
You need to show some code:

Is the whole project set to unicode or is it just the enumeration functions using unicode? How do you create the combo box and add the strings?

If it's the latter consider using the CreateWindow(Ex)W function for the combo box directly instead of relying on the macro. This will create the combo with Unicode and therefore also treats every string as Unicode.

Or you can use WideCharToMultiByte to modify the string.

Share this post


Link to post
Share on other sites

This topic is 3855 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this