Docking Panes tabs size |
Post Reply |
Author | |
VAGB
Newbie Joined: 23 November 2004 Status: Offline Points: 17 |
Post Options
Thanks(0)
Posted: 20 July 2005 at 4:21am |
Hi. I am trying to change the icons of a group of 5 docking panes with those of an Image List with a size of 36 square pixels each. The problem I am involved is that when those docking panes are showed the icons inside are small and not 36 pixels height. It seems that the tabs of the docking panes are always the same size and donīt rescale according to the icons size. As I donīt understand too much the structure and architecture of docking panes I have not found any way to make those tabs and icons be drawn properly. The lines of code where I implement the icons are these: // Creation of docking panes. CXTPDockingPane* pwndPane1 = m_paneManager.CreatePane(IDR_PANE_1, CRect(0, 0, 200, 120), xtpPaneDockLeft);CXTPDockingPane* pwndPane2 = m_paneManager.CreatePane(IDR_PANE_2, CRect(0, 0, 200, 120), xtpPaneDockBottom, pwndPane1); CXTPDockingPane* pwndPane3 = m_paneManager.CreatePane(IDR_PANE_3, CRect(200, 0, 200, 120), xtpPaneDockBottom, pwndPane2); CXTPDockingPane* pwndPane4 = m_paneManager.CreatePane(IDR_PANE_4, CRect(200, 0, 200, 120), xtpPaneDockBottom, pwndPane3); CXTPDockingPane* pwndPane5 = m_paneManager.CreatePane(IDR_PANE_5, CRect(200, 0, 200, 120), xtpPaneDockBottom, pwndPane4); UINT nIDIcons[] = {IDR_PANE_1, IDR_PANE_2, IDR_PANE_3, IDR_PANE_4, IDR_PANE_5}; if (!m_image_list.Create(36, 36, /*ILC_MASK |*/ ILC_COLOR24, 0, 0)){ TRACE0("Failed creating image list.\n"); return -1; }//if CBitmap bitmap;bitmap.LoadBitmap(IDB_TAB_ICONS); m_image_list.Add(&bitmap, RGB(0x00, 0x80, 0x80)); CXTPImageManager* icons_manager = m_paneManager.GetImageManager(); icons_manager->SetIcons(m_image_list, nIDIcons, _countof(nIDIcons), CSize(36, 36), xtpImageNormal); I donīt know if my code is wrong or something is missed. In fact the icons are found and displayed but are rescaled to fit the tabs instead of being those tabs to be rescaled to fit the icons. Can anyone help me or give any suggestion? Thanks in advance. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, try m_paneManager.GetPaintManager()->GetTabPaintManager()->m_szIcon = CSize(36, 36); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
VAGB
Newbie Joined: 23 November 2004 Status: Offline Points: 17 |
Post Options
Thanks(0)
|
It works fine! Thank you very much Oleg. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |