Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Using DDX_Control for CXTPControlEdit
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Using DDX_Control for CXTPControlEdit

 Post Reply Post Reply
Author
Message
DavidH View Drop Down
Groupie
Groupie


Joined: 24 March 2007
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote DavidH Quote  Post ReplyReply Direct Link To This Post Topic: Using DDX_Control for CXTPControlEdit
    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.

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: 06 March 2009 at 7:12am
Hi,
CXTPControlEdit is part of CommandBars.   guess you need CXTPEdit.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
DavidH View Drop Down
Groupie
Groupie


Joined: 24 March 2007
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote DavidH Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2009 at 7:19am
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.
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.