Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - 9.70: CXTPStatusBar and SetIcon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

9.70: CXTPStatusBar and SetIcon

 Post Reply Post Reply
Author
Message
aledh View Drop Down
Newbie
Newbie
Avatar

Joined: 10 January 2006
Location: United Kingdom
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote aledh Quote  Post ReplyReply Direct Link To This Post Topic: 9.70: CXTPStatusBar and SetIcon
    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.

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: 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
Back to Top
aledh View Drop Down
Newbie
Newbie
Avatar

Joined: 10 January 2006
Location: United Kingdom
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote aledh Quote  Post ReplyReply Direct Link To This Post 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.
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.047 seconds.