CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 1999
    Posts
    11

    System Image List

    My class declaration
    class CFileListCtrl : public CFileList
    In an instance of my class CFileListCtrl i need
    access to the system image list which I get thrue
    the usual way described here on codeguru's pages.
    SHGetFileINfo that is....
    I got two problems,
    1.
    I have five instances of CFileListCTrl in my application (a MDI application). Since it seem you can only get one HANDLE to the system image list how am I suppose to give access to all my CFileListCtrl. make it global or what?
    2.
    Because I have a MDI application theres a problem when i open a new MDI window which also needs a system image list. Should I Detach() the system Image List every time the MDI window goes out of scope or what?



  2. #2
    Join Date
    Apr 1999
    Posts
    52

    Re: System Image List

    You know how to get the system image list, right? Then do something like this.

    CImageList myImgList;
    myImgList.Attach(hSystemImgList);
    myListCtrl.SetImageList(&myImgList,LVSIL_NORMAL);
    myImgList.Detach();



    I've done it before, and it works.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured