![]() |
CXTPCustomizeSheet & Custom Controls |
Post Reply ![]() |
Author | |
grahamf ![]() Groupie ![]() ![]() Joined: 29 October 2009 Location: United States Status: Offline Points: 13 |
![]() ![]() ![]() ![]() ![]() Posted: 29 October 2009 at 6:18pm |
Hi there,
I am evaluating ToolKit Pro 2009 to replace RogueWave's Objective Toolkit. So far so good. However I have a question/problem about the ability to add a custom control to the CXTPCustomizeSheet. First, it seems as though attempting to find the control via GetCommandBars()->FindControl() using xtpControlCustom fails. Using xtpControlError actually does find (a) control. Second, adding the control via pControls->AddClone() adds the command entry, but it does not show the command using the (encapsulated) control - it is as though it regards it as a simple menu command. To show this, I modified the CustomThemes sample, and created a CComboBox control for ID_EDIT_STATE, and wrapped it in a custom control. It appears fine in the toolbar. However, when looking at the Test category in the customize Command page, it appears as a simple menu command. NOTE: of course you need to change the FindControl() to use xtpControlError for the ID_EDIT_STATE control. Otherwise it will not show up at all. What do I need to do to get this to work? Cheers, Graham |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Yes, CustomControls can't be dragged from Sheet. What user have see if he drag 2 same custom controls ? you still have only one window attached to them.
There is way to create control dervied from CXTPControl and manually clone its attached window - see how CXTPControlSlider works.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
grahamf ![]() Groupie ![]() ![]() Joined: 29 October 2009 Location: United States Status: Offline Points: 13 |
![]() ![]() ![]() ![]() ![]() |
G'day Oleg,
Ah ok so you derive from CXTPControl if you want that functionality. As for what the user sees, in our current implementation using RogueWave Objective Toolkit, our application maintains a set of the controls for each unique command ID. Each control in the set is kept in synchronisation via notifications made back to our mainframe. Our mainframe ensures that when a signle control is updated, it will update the state of its 'duplicate' controls in that control's set. There is cleanup code in there also to handle when such a control is removed. Thanks for the information. Cheers, Graham |
|
![]() |
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 |