![]() |
Why assume my instance? |
Post Reply
|
| Author | |
scruzer
Groupie
Joined: 01 February 2008 Location: United States Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Topic: Why assume my instance?Posted: 01 February 2008 at 12:08am |
|
On my first attempt to use the toolkit, I ran into a problem immediately.
I decided to use the CXTTrayIcon class. Upon attempting to use the animation support -- I found that I must submit the icon's by ID. ONLY. In my world, I make branded versions of my software. All of my branded resources live in a dll. I guess, I just want to say -- please don't write API's that always assume "this module" as the resource source.... Or provide a way to override such things without updating the source.... or... something easy. Thanks -p |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 February 2008 at 1:39am |
|
Hi,
Here method you need:
CXTTrayIcon::SetIcon(HICON hIcon)
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
scruzer
Groupie
Joined: 01 February 2008 Location: United States Status: Offline Points: 13 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 February 2008 at 2:07am |
|
So, like, how do I animate with a single HICON?
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 February 2008 at 3:27pm |
|
sorry, skipped "animation" word.
I see 2 solutions -
1. CXTTray load icons from hInstance = AfxGetResourceHandle(); so if you use your dll as primary resource call AfxSetResourceHandle(hYourDll); and CXTTray will load icons from dll.
or
2. make class derived from CXTTrayIcon and add icons to m_arTrayIcons collection. see sources.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
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 |