Print Page | Close Window

Docking Panes’ tabs size

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=2603
Printed Date: 12 December 2024 at 1:35am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Docking Panes’ tabs size
Posted By: VAGB
Subject: Docking Panes’ tabs size
Date 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.




Replies:
Posted By: Oleg
Date Posted: 21 July 2005 at 8:01am

Hi,

try

m_paneManager.GetPaintManager()->GetTabPaintManager()->m_szIcon = CSize(36, 36);



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


Posted By: VAGB
Date Posted: 21 July 2005 at 10:35am

It works fine!

Thank you very much Oleg.




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