Print Page | Close Window

9.70: CXTPStatusBar and SetIcon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=3502
Printed Date: 09 November 2025 at 9:08pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: 9.70: CXTPStatusBar and SetIcon
Posted By: aledh
Subject: 9.70: CXTPStatusBar and SetIcon
Date Posted: 11 January 2006 at 5:48am
My application previously used Xtreme Toolkit V9.51, but has since been updated to use V9.70. However, I've noticed a problem with the status bar: I try to assign an icon to some of the status bar panels (such that I get an icon to the left of the text within the panel). This worked fine with V9.51, but it seems the icons are no longer drawn in V9.70.

Here is an example of the code located in CMainFrame::OnCreate():
m_hIcon = (HICON)LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_TESTICON), IMAGE_ICON, 16, 16, 0);

CStatusBarCtrl& ctrl = m_wndStatusBar.GetStatusBarCtrl();
// Set icon in panel 1
ctrl.SetIcon(1, m_hIcon);

Identical code under XTP9.51 works fine. Looking inside CXTPStatusBar::OnPaint() source code (in particular the paintmanager), I see no code for doing the icon.

Is this a fault in V9.70 and if so, is it corrected on later versions. Or perhaps am I doing things wrong.

I'm developing under VC++ 6.0 by the way.




Replies:
Posted By: Oleg
Date Posted: 11 January 2006 at 11:17am

Hello,

CXTPStatusbar of 9.70 not supported icons, you can simple replace CXTPStatusBar to CStatusBar.

In 9.81 you can use CXTPStatusBarPane::SetIconIndex method.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: aledh
Date Posted: 12 January 2006 at 5:10am
Thanks Oleg,
I've switched back to CStatusBar for now as I don't yet have V9.81 (although this did mean a few code tweaks and a slightly different visual style).

Aled.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net