Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Problems with CXTToolBar::LoadBitmap()
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problems with CXTToolBar::LoadBitmap()

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


Joined: 15 May 2003
Location: Sweden
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jonas Quote  Post ReplyReply Direct Link To This Post Topic: Problems with CXTToolBar::LoadBitmap()
    Posted: 29 October 2003 at 3:40am

My intention is to create dynamic toolbars at run-time. However, the CXTToolBar::LoadBitmap() doesn't seem to work (i.e the button images does not show up). I tried the same code with MFC's CToolBar and that works perfectly.

Here is a snippet from my code:

 static UINT BASED_CODE TB_IDS[] =
 {
  34500,     // ID_BUTTON1
  34501,     // ID_BUTTON2
  ID_SEPARATOR,
  34502,
  34503
 };

DWORD dwStyle = WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC;

m_wndDynToolBar.CreateEx(this, TBSTYLE_FLAT, dwStyle, CRect(0, 0, 0, 0), 59500)m_wndDynToolBar.LoadBitmap(IDB_TB);
m_wndDynToolBar.SetButtons(TB_IDS, sizeof(TB_IDS) / sizeof(UINT));
m_wndDynToolBar.SetWindowText(_T("Dynamic toolbar"));

----------

IDB_TB is a 64x15 16 color bitmap. m_wndDynToolBar is a CXTToolBar instance.

Update: The bitmap images show up if xtAfxData.bXPMode is set to FALSE. Not otherwise.

Regards,

Jonas E



Edited by Jonas
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.109 seconds.