EnableVisualStyles causes CComboBoxEx to stop showing images

M

Mike

I have a C# DLL that calls a function in a C++ DLL. The C++ function
displays a window that has a combo box (CComboBoxEx) control. If I
enable visual styles in my C# DLL, images do not appear in the combo
box. How can this be fixed?

Thanks,
Mike
 
M

Mike

I should have mentioned that I am already performing a DoEvents()
after I enable visual styles.
 
M

Michael A. Covington

Mike said:
I have a C# DLL that calls a function in a C++ DLL. The C++ function
displays a window that has a combo box (CComboBoxEx) control. If I
enable visual styles in my C# DLL, images do not appear in the combo
box. How can this be fixed?

Your problem may be related to this:

http://www.covingtoninnovations.com/michael/blog/0606/index.html#060621

The actual events that occur are somewhat different when visual styles are
enabled.
 
M

Mike

That does not appear to be the problem here. But thanks for the
suggestion.

Any other ideas? Nothing unusual is being done with the control. It is
a CComboBoxEx. We set up a CImageList and assign it to the combo box.
As items are added to the combo box, the appropriate iImage and
iSelectedImage values are set. This is all done within OnInitDialog
after the base function is called. Nothing more is done with the
control until the user clicks OK and we retrieve the selection.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top