Results 1 to 5 of 5

Thread: [Resolved] Icons

  1. #1

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Resolved [Resolved] Icons

    New to most things graphical . . .

    I have a collection of objects which I need to expose their associated icon (there are two friend properties called LargeIcon, and SmallIcon)

    The question, then. I want to return the icons in a format that is easy to use for the calling app (this collection of objects is in a DLL)

    Should I be using a Byte(), or perhaps IPictureDisp, or even Image? I intend to keep the icons on disk in the original .ico file format. Perhaps it's better to use a resource file?

    These icons will be used in context sensitive menus, toolbars - the whole caboodle.

    Any advice (and supporting) code will be most gratefully received.

    Cheers,

    Yr
    Last edited by yrwyddfa; Apr 10th, 2006 at 09:18 AM.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  2. #2
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: Icons

    Have you tried the ImageList control? I think thats what i'd go for
    Chris

  3. #3

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Icons

    No!

    Unless you know of some way to properly control an ImageList control (and it's instantiation) in a DLL?
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

  4. #4
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: Icons

    put a form in the DLL, set the Visible = False
    Then put an ImageList (Or any control) on the form, and use it from the DLL class...

  5. #5

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    Re: Icons

    I can't do that. Apart from the lack of control over the resources (this DLL will be resident on a terminal server) it doesn't feel like a clean way of doing it.

    I'm going for a RES file using LoadRes(n) to get the images.

    Thanks for your input anyway.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

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