![]() |
Using DDX_Control for CXTPControlEdit |
Post Reply ![]() |
Author | |
DavidH ![]() Groupie ![]() Joined: 24 March 2007 Status: Offline Points: 60 |
![]() ![]() ![]() ![]() ![]() Posted: 06 March 2009 at 5:42am |
Hi,
I have defined a Dialog box in my resource file. It has an edit box defined as follows: EDITTEXT IDC_LENGTH,62,8,54,12,ES_AUTOHSCROLL | NOT WS_BORDER,WS_EX_STATICEDGE In the accompanying CXTPDialog derived class I try to put an CXTPControlEdit in its place using DDX_Control: In the class declaration: class CSetLengthDlg: CXTPDialog { ... CXTPControlEdit veLength_; ... }; In the implementation: void CSetLengthDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_LENGTH, veLength_); } The compiler complains: error C2664: 'DDX_Control' : cannot convert parameter 3 from 'CXTPControlEdit' to 'CWnd &' Although this is the standard MFC approach, I'm obviously taking the wrong route here. What's the CodeJock way to do this? Thanks a lot for your help. David. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
CXTPControlEdit is part of CommandBars. guess you need CXTPEdit.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
DavidH ![]() Groupie ![]() Joined: 24 March 2007 Status: Offline Points: 60 |
![]() ![]() ![]() ![]() ![]() |
Yes, I think so too.
It's only that I'm not using CXTPControlEdit itself, but my own class derived from CXTPControlEdit. It does some complex input parsing, so I prefer to use the same class in the Ribbon and in the Dialogs. Maybe it's just not possible, and I just need to share the parsing logic. David. |
|
![]() |
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 |