Print Page | Close Window

Ownerdrawn CXTPControlButton

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=6804
Printed Date: 31 October 2024 at 11:40pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ownerdrawn CXTPControlButton
Posted By: akur
Subject: Ownerdrawn CXTPControlButton
Date Posted: 05 April 2007 at 4:50am
Hello,

I would need to have toolbar buttons which are completely drawn by ourselves, _not_ specifying any icon for these buttons.

The first idea was to override CXTPControlButton::Draw() to draw the entire bitmap of the button, but unfortunately this method is not called by XTP unless I specify an icon for that button previously (through pButton->SetIconId() or pButton->SetCustomIcon()).

Do you know a way how to achieve a call to that Draw() method without specifying any icon ID for the buttons?

Thank you very much, in advance!





Replies:
Posted By: Oleg
Date Posted: 05 April 2007 at 7:49am
Hello,
 
it called always.


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


Posted By: Oleg
Date Posted: 05 April 2007 at 7:50am
ps. Here simple sample: https://forum.codejock.com/uploads/20070405_075012_Logo.zip - Logo.zip


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


Posted By: akur
Date Posted: 10 April 2007 at 5:13am
Hello,

yes, you're right. Sorry, my initial question should not be related to CXTPControlbutton::Draw(), but to CXTPPaintManager::DrawImage(). I want to keep XTP's drawing of buttons, except the button image.

So the right question would be: how do I achieve that DrawImage() is called inside CXTPPaintManager::DrawControlToolBarParent() without specifying an icon ID for my CXTPControlButton override?


Posted By: Oleg
Date Posted: 10 April 2007 at 7:22am
Hi,
You can't achieve this.


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


Posted By: akur
Date Posted: 10 April 2007 at 7:32am
Thank you, anyway.
I'm not glad to hear this, but I somehow knew this will be your answer. 



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