CXTPTabClientWnd Tab Icons
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=9339
Printed Date: 14 November 2025 at 12:29pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: CXTPTabClientWnd Tab Icons
Posted By: Jayonas
Subject: CXTPTabClientWnd Tab Icons
Date 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.
|
Replies:
Posted By: Oleg
Date Posted: 18 January 2008 at 2:10am
Yeap, CXTPTabClientWnd::CWorkspace::DrawIcon is method you need override.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
|