[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

EnableVisualStyles causes CComboBoxEx to stop showing images

MLM450

10/15/2007 7:02:00 PM

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

3 Answers

MLM450

10/15/2007 8:03:00 PM

0

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

On Oct 15, 3:02 pm, Mike <MLM...@hotmail.com> wrote:
> 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


Michael A. Covington

10/15/2007 11:44:00 PM

0

"Mike" <MLM450@hotmail.com> wrote in message
news:1192474942.427762.176870@q5g2000prf.googlegroups.com...
>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.h...

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



MLM450

10/16/2007 12:45:00 PM

0

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.

On Oct 15, 7:44 pm, "Michael A. Covington"
<l...@ai.uga.edu.for.address> wrote:
> "Mike" <MLM...@hotmail.com> wrote in message
>
> news:1192474942.427762.176870@q5g2000prf.googlegroups.com...
>
> >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.h...
>
> The actual events that occur are somewhat different when visual styles are
> enabled.