Print Page | Close Window

Random GDI icons on Toobarbuttons

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=14480
Printed Date: 05 July 2024 at 7:11am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Random GDI icons on Toobarbuttons
Posted By: BobWansink
Subject: Random GDI icons on Toobarbuttons
Date Posted: 09 June 2009 at 8:21am
Hi all,

We've been using the Commandbars for a while now, and something seems to be going wrong.

Our toolbars are dynamic. We create them with a constructor and Add() them to CXPControl * pControls.

Everything seems in order, but sometimes we get icons that disappear; they are there the first time we load the dialog, but when the menu and toolbar's are recalculated, we get toolbaritems without icons, or worse, with random windows icons.

From Google, I've learned that random icons on toolbars often means that the gdi pool might be full.

Icons are loaded into a CImageList, and each Control that has an icon uses function CXTPControl::SetIconId(); to add an icon to the control.

Do any of you know what might cause my toolbar to display the wrong images?

Thanks in advance.

Bob


-------------
     Product: Xtreme ToolkitPro (MFC) version 13.0.0
     Platform: Windows (32bit) - XP - Vista
     Language: Visual C++



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