How to subclass controls from CommandBarDesigner? |
Post Reply |
Author | |
maxxan
Groupie Joined: 15 July 2009 Status: Offline Points: 49 |
Post Options
Thanks(0)
Posted: 17 December 2010 at 2:49am |
Hi!
If I create my ribbon bars in the command bar designer and add, for example a combo box, how can I later subclass that to my inherited CXTPControlComboBox? Usually I do that in OnCreateControl, but that's not called for controls created in the command bar designer. So what is the correct/nice way to do it? This is how it was done before in OnCreateControl: if (lpCreateControl->nID == ID_MY_CUSTOM_COMBO_BOX) { lpCreateControl->pControl = new MyCustomComboBox(); return TRUE; } Thanks!
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Yes, when you load it from designer OncreateControl won't be called beacause all controls already created in designer. so you can use CXTPControls::FindControl method, remove old and add new with CXTPControls::Add method.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |