Print Page | Close Window

CXTPToolBar appearance

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=6534
Printed Date: 12 November 2025 at 9:47am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPToolBar appearance
Posted By: mermaid
Subject: CXTPToolBar appearance
Date Posted: 01 March 2007 at 2:23am

Hello, we are using CXTPToolBar class for our applications and find some drawing problems. Resources for
several toolbars was created in VC6 and then translated to VC8 (MFC CToolBar was replaced with CXTPToolBar).
All toolbars, except one, appear correctly. In that one case background is not transparent and black color is replaced with background color. Toolbars creating code is similar, all toolbar bitmaps was created in VC6 resource editor.

Please, look screenshot, toolbar bitmaps and toolbar creation code:

(in tool_map.bmp there is wrong bmp)
 
//Creating left toolbar (no problem)
CXTPToolBar* pToolBar = (CXTPToolBar*)pCommandBars->Add(name, xtpBarTop);
CXTPToolBar*pToolMain=pToolBar;
if (!pToolBar || !pToolBar->LoadToolBar(IDR_MAINFRAME))
{
     TRACE0("Failed to create toolbar\n");
     return;
}

// Creating right toolbar (black color is replaced with background color)
pToolBar = (CXTPToolBar*)  pCommandBars->Add(name, xtpBarTop);
if (!pToolBar || !pToolBar->LoadToolBar(IDR_TOOL_MAPS))
{
 TRACE0("Failed to create toolbar\n");
 return;
}

https://forum.codejock.com/uploads/20070301_021830_toolbars.rar - uploads/20070301_021830_toolbars.rar



Replies:
Posted By: Oleg
Date Posted: 01 March 2007 at 4:38am
Hi,
 
ImageManager always use TopLeft pixel as transparent.
you can manually set transparent pixeL
 
pCommandBars->GetImagerManager()->SetMaskColor(...);
 
 
ps. Why you don't use CXTPMenuBar for main menu ?


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


Posted By: mermaid
Date Posted: 01 March 2007 at 6:01am
Thanks. Now it works.



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