Click here to Skip to main content
15,887,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unable to read in edit control data Pin
Orjan Westin15-Apr-13 22:47
professionalOrjan Westin15-Apr-13 22:47 
GeneralRe: Unable to read in edit control data Pin
Richard MacCutchan15-Apr-13 23:05
mveRichard MacCutchan15-Apr-13 23:05 
GeneralRe: Unable to read in edit control data Pin
Orjan Westin16-Apr-13 0:14
professionalOrjan Westin16-Apr-13 0:14 
GeneralRe: Unable to read in edit control data Pin
H.Brydon16-Apr-13 4:56
professionalH.Brydon16-Apr-13 4:56 
GeneralRe: Unable to read in edit control data Pin
Richard MacCutchan15-Apr-13 23:47
mveRichard MacCutchan15-Apr-13 23:47 
AnswerRe: Unable to read in edit control data Pin
H.Brydon15-Apr-13 17:42
professionalH.Brydon15-Apr-13 17:42 
GeneralRe: Unable to read in edit control data Pin
ForNow15-Apr-13 18:36
ForNow15-Apr-13 18:36 
AnswerRe: Unable to read in edit control data Pin
H.Brydon16-Apr-13 5:10
professionalH.Brydon16-Apr-13 5:10 
In case there is confusion. Here is what I am suggesting...

You said (edited):

C++
void Cprogdialog::DoDataExchange(CDataExchange* pDX)
{
    CDialog::DoDataExchange(pDX);

    // Attach the Control to objects
    DDX_Control(pDX,IDC_STATIC5,sprogname);
    DDX_Control(pDX,IDC_EDIT3,eprogname);
    DDX_Control(pDX,IDC_STATIC9,sjobname);
    DDX_Control(pDX,IDC_EDIT4,ejobname);
    DDX_Control(pDX,IDC_STATIC7,slocation);
    DDX_Control(pDX,IDC_EDIT5,elocation);
    DDX_Control(pDX,IDC_STATIC8,saddr);
    DDX_Control(pDX,IDC_EDIT6,eaddr);
    DDX_Control(pDX,IDC_PUSH,process);

    // ATTACH VARIABLES TO HOLD INFO
    DDX_Text(pDX,IDC_EDIT3,progname);
    DDX_Text(pDX,IDC_EDIT4,jobname);
    DDX_Text(pDX,IDC_EDIT5,location);
    DDX_Text(pDX,IDC_EDIT6,addr);
}


What we (collectively) are suggesting is:

C++
void Cprogdialog::DoDataExchange(CDataExchange* pDX)
{
    CDialog::DoDataExchange(pDX);

    // Attach the Control to objects
    DDX_Control(pDX,IDC_SPROGNAME, sprogname);
    DDX_Control(pDX,IDC_EPROGNAME, eprogname);
    DDX_Control(pDX,IDC_SJOBNAME,  sjobname);
    DDX_Control(pDX,IDC_EJOBNAME,  ejobname);
    DDX_Control(pDX,IDC_SLOCATION, slocation);
    DDX_Control(pDX,IDC_ELOCATION, elocation);
    DDX_Control(pDX,IDC_SADDR,     saddr);
    DDX_Control(pDX,IDC_EADDR,     eaddr);
    DDX_Control(pDX,IDC_PROCESS,   process);

    // ATTACH VARIABLES TO HOLD INFO
    DDX_Text(pDX,IDC_EPROGNAME, progname);
    DDX_Text(pDX,IDC_EJOBNAME,  jobname);
    DDX_Text(pDX,IDC_ELOCATION, location);
    DDX_Text(pDX,IDC_EADDR,     addr);
}


Making sure that the resource editor is closed (ie. close the window), open resource.h and manually edit all of the IDC_xxx values to make sure that they are unique. The values themselves don't matter that much; just that they are unique.

I would have used "m_ctl" and "m_s" prefixes on the vars as well but that is really just style.
--
Harvey

GeneralRe: Unable to read in edit control data Pin
ForNow16-Apr-13 6:55
ForNow16-Apr-13 6:55 
Questionwhy cannot find code map in vistual studio2012 update2? Pin
hack00414-Apr-13 21:23
hack00414-Apr-13 21:23 
QuestionRe: why cannot find code map in vistual studio2012 update2? Pin
Richard MacCutchan14-Apr-13 22:55
mveRichard MacCutchan14-Apr-13 22:55 
AnswerRe: why cannot find code map in vistual studio2012 update2? Pin
hack00414-Apr-13 23:55
hack00414-Apr-13 23:55 
GeneralRe: why cannot find code map in vistual studio2012 update2? Pin
Richard MacCutchan15-Apr-13 0:21
mveRichard MacCutchan15-Apr-13 0:21 
AnswerRe: why cannot find code map in vistual studio2012 update2? Pin
Sarath C15-Apr-13 7:19
Sarath C15-Apr-13 7:19 
AnswerRe: why cannot find code map in vistual studio2012 update2? Pin
«_Superman_»15-Apr-13 16:16
professional«_Superman_»15-Apr-13 16:16 
Questionthe big-ending and little-ending Pin
ITboy_Lemon13-Apr-13 6:27
professionalITboy_Lemon13-Apr-13 6:27 
AnswerRe: the big-ending and little-ending Pin
dusty_dex13-Apr-13 6:57
dusty_dex13-Apr-13 6:57 
GeneralRe: the big-ending and little-ending Pin
pasztorpisti13-Apr-13 11:56
pasztorpisti13-Apr-13 11:56 
GeneralRe: the big-ending and little-ending Pin
dusty_dex13-Apr-13 12:16
dusty_dex13-Apr-13 12:16 
GeneralRe: the big-ending and little-ending Pin
pasztorpisti13-Apr-13 13:36
pasztorpisti13-Apr-13 13:36 
AnswerRe: the big-ending and little-ending Pin
pasztorpisti13-Apr-13 11:49
pasztorpisti13-Apr-13 11:49 
GeneralRe: the big-ending and little-ending Pin
ITboy_Lemon13-Apr-13 14:41
professionalITboy_Lemon13-Apr-13 14:41 
GeneralRe: the big-ending and little-ending Pin
pasztorpisti14-Apr-13 8:29
pasztorpisti14-Apr-13 8:29 
AnswerRe: the big-ending and little-ending Pin
Erudite_Eric13-Apr-13 23:37
Erudite_Eric13-Apr-13 23:37 
AnswerRe: the big-ending and little-ending Pin
jschell14-Apr-13 7:08
jschell14-Apr-13 7:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.