Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - 32-bit icons in tree view/toolbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

32-bit icons in tree view/toolbar

 Post Reply Post Reply
Author
Message
Unormal View Drop Down
Newbie
Newbie
Avatar

Joined: 12 November 2003
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Unormal Quote  Post ReplyReply Direct Link To This Post Topic: 32-bit icons in tree view/toolbar
    Posted: 31 December 2003 at 1:36pm

Anyone know of a good way to get 32 bit icons/bitmaps in toolbars / treeviews?

Thanks!

Back to Top
caiden1347 View Drop Down
Newbie
Newbie
Avatar

Joined: 28 January 2004
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote caiden1347 Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2004 at 2:08pm

Was having a similar problem...

Try this solution (WinXP only using Studio.NET 2003):

1)  Add '.manifest' file to application (see http://www.dotnet247.com/247reference/msgs/11/59317.aspx).  This enables WinXP styles in the app.

2)  Add an empty ImageList to your form, to be used with your toolbar.  Add icons to your ImageList and assign these to your toolbar.  The icons will not appear correctly (8 bit alpha will show as 1 bit blackness).  This is just so you can preview the icons in the designer.

3)  In your code, do the following:

imageList.Images.Clear();

Icon icon = new Icon(fileName);

imageList.Images.Add(icon); // For each icon you are using

 

Hope this helps...

-Matt

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.