Print Page | Close Window

please help!

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=3744
Printed Date: 10 November 2025 at 1:41am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: please help!
Posted By: wuyunpeng
Subject: please help!
Date Posted: 08 March 2006 at 8:25am

My toolbars is build with code(not load from resource),and i have a CImageList object which contains all my bitmap resource for my toolbars.

i use the following code to build my toolbars:

CXTPControl* pControl = pToolBar->GetControls()->Add(...);

pControl->SetCaption(...);

pControl->SetDescription(..);

pControl->SetIconId(..);

pControl->SetIconId() need a icon resource id but i have an image list only.

would you please tell me how to deal with this situation.




Replies:
Posted By: Oleg
Date Posted: 08 March 2006 at 10:46am

Hello,

First you must copy icons from ImageList to ImageManager:

pCommandBars->GetImageManager()->SetIcons(imlIcons, NULL, 0, CSize(16, 16));

 

assign Index of Icon

pControl->SetIconId(1);

pControl->SetIconId(2);

...



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



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