ATL Control inside .Net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jhchristiansen@bksv.com

    #1

    ATL Control inside .Net

    Hi there,

    I have an ATL Control containing a ListView. This ListView contains
    several rows and columns with text and bitmaps. The control has worked
    fine several years inside a c++ application.

    Now I'm going to put this control into a .Net application which is
    normally pretty easy. But it seems that if a put the initialization of
    the ATL control into the InitializeCompo nent or in the Constructor of
    the exe then the listview acts normally with pictures and texts.

    BUT if I initialize the control later. I.e. in another form that is
    shown when I click a button. Then the images are gone from the ATL
    Control. Pretty wired!

    So what I can conclude from all my tests is that when the ATL control
    is initialized later than the first constructor (the constructor of
    the class that will be created by the Main) then the images will not
    be shown. This is all so true if I create a dll containing the ATL
    Control and launch the from a button in my exe - the images are not
    shown.

    How can that be? Does anyone have an idea how to solve this problem?
Working...