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

CXTPToolBar appearance

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

Joined: 01 March 2007
Location: Russian Federation
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote mermaid Quote  Post ReplyReply Direct Link To This Post Topic: CXTPToolBar appearance
    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;
}

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

Joined: 01 March 2007
Location: Russian Federation
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote mermaid Quote  Post ReplyReply Direct Link To This Post Posted: 01 March 2007 at 6:01am
Thanks. Now it works.
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.061 seconds.