Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Ownerdrawn CXTPControlButton
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ownerdrawn CXTPControlButton

 Post Reply Post Reply
Author
Message
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post Topic: Ownerdrawn CXTPControlButton
    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!


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2007 at 7:49am
Hello,
 
it called always.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 April 2007 at 7:50am
ps. Here simple sample: Logo.zip
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2007 at 7:22am
Hi,
You can't achieve this.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post 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. 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.