Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Why assume my instance?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Why assume my instance?

 Post Reply Post Reply
Author
Message
scruzer View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2008
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote scruzer Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2008 at 1:39am
Hi,
Here method you need:
CXTTrayIcon::SetIcon(HICON hIcon)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
scruzer View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2008
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote scruzer Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2008 at 2:07am
So, like, how do I animate with a single HICON?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.