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

CXTPTabClientWnd Tab Icons

 Post Reply Post Reply
Author
Message
Jayonas View Drop Down
Newbie
Newbie


Joined: 28 September 2007
Location: United States
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jayonas Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTabClientWnd Tab Icons
    Posted: 17 January 2008 at 6:38pm
I'm looking for the best way to customize the icon to display on each tab in a CXTPTabClientWnd. As far as I can tell, the easiest option is to handle the WM_XTP_GETTABICON message in my derivation of CMDIChildWnd. My problem with this is that it only works with HICONs. Is there a way to specify a PNG or other type of bitmap resource to use as the tab's icon rather than an ICON resource?

It looks like I might be able to override CXTPTabClientWnd::CreateWorkspace to provide my own type of workspace, and override the CWorkspace::DrawIcon to draw anything I want. Is that really the best/easiest way to do it, or did I miss something else?

I guess I was expecting it to be able to pull an image out of the CXTPImageManager in my CommandBars based on some ID (the resource ID of the CDocTemplate, perhaps), just like the icons in the ribbon and status bar and docking panes and everywhere else.
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: 18 January 2008 at 2:10am
Yeap, CXTPTabClientWnd::CWorkspace::DrawIcon is method you need override.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.078 seconds.