![]() |
Adding icons to ImaageManager .AddIcon |
Post Reply ![]() |
Author | |
Shawshank ![]() Senior Member ![]() Joined: 16 October 2005 Status: Offline Points: 117 |
![]() ![]() ![]() ![]() ![]() Posted: 22 February 2006 at 12:26am |
I am attempting to dynamically load file type association icons into the ImageManager. This means some times the icon is a full path to a .ico file or it can be indexed into a library file or EXE. In this latter case I use ExtractIcon to get the handle. That works fine. It isn't until I try to add the icon to the ImageManager via .AddIcon that I have trouble. ExtractIcon provides me with a handle and I assign that to the ImageManager.AddIcon property. Checking the Watch window I see that the .Count property for the ImageManager.Cont property has increased by one. This leads me to believe that it was successful. When I then attempt to add the icon from the Imagemanager to the ReportRecordItem that trouble occurs. It simply doesn't appear --even after a .Populate call. iPos% = InStrRev(sIconPath$, ",") End If lIconIdx& = (Me.ImageMan.Icons.Count + 1) Me.ImageMan.Icons.AddIcon hIcon&, lIconIdx&, xtpImageNormal Me.rc.Records.Record(lIdx&).Item(1).Icon = lIconIdx& I have no trouble using .LoadIcon. Is there something wrong with the code above? Should it not work? Any insight would be greatly appreciated! |
|
![]() |
|
Shawshank ![]() Senior Member ![]() Joined: 16 October 2005 Status: Offline Points: 117 |
![]() ![]() ![]() ![]() ![]() |
Using ExtractIconEx solved the issue. ExtractIcon loads 32x32 by default.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |