Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Custom Icons
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Custom Icons

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


Joined: 02 November 2004
Location: United States
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote grudy Quote  Post ReplyReply Direct Link To This Post Topic: Custom Icons
    Posted: 04 November 2004 at 10:22am

My application allows users to customize our toolbars and menus using a programming API - everything works great except I can't figure out how to allow them to change icons, and have them saved.

I can use XTPImageManager( )->SetIcons( ) to load a bitmap/icon that they specify and have it show up as the icon in the menu or toolbar, however when you exit, the new image is not saved in the registry. If I go thru customization and create an icon, that image is properly saved, however that uses XTPImageManager( )->AddCustomIcon( ) which is private (also sets m_nCustomIconId in CXTPControl, which is likewise not public)

Is there some way that I am missing to create the custom icon image programmatically at runtime, and get it saved.

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 05 November 2004 at 1:27am

In next release we added

void CXTPControl::AddCustomIcon(HICON hIcon)
{
 CXTPImageManager* pImageManager = GetImageManager();
 if (pImageManager)
 {
  m_nCustomIconId = pImageManager->AddCustomIcon(hIcon);
 }
}

and make CXTPImageManager::AddCustomIcon public.

 

so you can patch your sources too.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 05 November 2004 at 1:28am
better CXTPControl::SetCustomIcon
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
grudy View Drop Down
Groupie
Groupie


Joined: 02 November 2004
Location: United States
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote grudy Quote  Post ReplyReply Direct Link To This Post Posted: 05 November 2004 at 8:50am
Thanks. That is just what I needed. It works great.
Back to Top
Green View Drop Down
Newbie
Newbie
Avatar

Joined: 14 January 2005
Location: Russian Federation
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Green Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2005 at 4:01am

Hi Oleg,
void CXTPImageManager::RemoveAll(void) doesn't reset m_nCustomID to its default state. Actually bug will never occurs. But it looks like defect, isn't it?

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