Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CXTPCustomizeSheet & Custom Controls
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPCustomizeSheet & Custom Controls

 Post Reply Post Reply
Author
Message
grahamf View Drop Down
Groupie
Groupie
Avatar

Joined: 29 October 2009
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote grahamf Quote  Post ReplyReply Direct Link To This Post Topic: CXTPCustomizeSheet & Custom Controls
    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
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: 30 October 2009 at 8:35am
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
Back to Top
grahamf View Drop Down
Groupie
Groupie
Avatar

Joined: 29 October 2009
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote grahamf Quote  Post ReplyReply Direct Link To This Post Posted: 30 October 2009 at 9:50am
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
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.