|
-
May 3rd, 2010, 10:35 AM
#1
MFC - How to set value of edit box on initialisation of dialog
This feels like it should be the simplest thing in the world, but after days of searching the web, and reading through tens of tutorials/technical papers, I'm still none the wiser about how to do this.
Basically, there is functionality in my application to edit the member data of objects stored in a doubly linked list. The add functionality is absolutely fine as the controls start blank, but for the edit I need to be able to populate the edit controls with the current data from the object.
For example, I have an IDC_EDIT control, described in the DoDataExchange function as:
Code:
DDX_Text(pDX, IDC_EDIT3, manufacturer);
this has the variable manufacturer assigned to it as a CString value. Not all of the edit boxes on the page are this type, but I just include this for example.
I just need someone to point me in the right direction on how to set the values of these edit boxes so that they show up in the edit boxes on the .DoModal() call. I'm at my wit's end with this one!
Thanks in advance.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|