Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - ImageManager Icon Handle
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ImageManager Icon Handle

 Post Reply Post Reply
Author
Message
ScottW View Drop Down
Groupie
Groupie


Joined: 02 August 2005
Status: Offline
Points: 82
Post Options Post Options   Thanks (0) Thanks(0)   Quote ScottW Quote  Post ReplyReply Direct Link To This Post Topic: ImageManager Icon Handle
    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

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.204 seconds.