ImageManager Icon Handle |
Post Reply |
Author | |
ScottW
Groupie Joined: 02 August 2005 Status: Offline Points: 82 |
Post Options
Thanks(0)
Posted: 10 December 2016 at 4:36pm |
I'm trying to use ImageManager icons at runtime to set the MDI Child Form and Workspace Tab Icons. Using Form.Icon always looks terrible, but this works and looks great:
hBitmap = LoadImageAsString(0, "somefile.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE) SendMessageLong Me.hWnd, WM_SETICON, ICON_SMALL, hBitmap The problem is that I'm not distributing all of the individual icons with my app. Just one binary file with all of the icons in ImageManager format. Once I have that loaded, how can I get an Icon handle for any given ImageManager Icon that is compatible with WM_SETICON? This doesn't seem to work: hBitmap = ImageManagerIcons.GetImage(ICON_ID, 16).Handle SendMessageLong Me.hWnd, WM_SETICON, ICON_SMALL, hBitmap Is there some other way to do this? Thanks |
|
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 |