Results 1 to 2 of 2

Thread: easy vc++ questions

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    UK
    Posts
    164

    easy vc++ questions

    Hi,
    I am a VB programmer who is learning VC++.net. I want to know how to get the values from edit boxes on dialogs.

    Using the wizard I have created a MFC, SDI application. I have created a dialog box and a subsequent class for the dialog. I then created a member variable connected by value to the edit box of type CString. This dialog box is shown when the user clicks an item on the menu.

    What is the syntax of retrieving the value in the edit box when for example the user clicks ok on the dialog or setting it by code before the dialog is shown?

    Is CString variables different from String variables?
    What does Afx stand for as in "AfxMessageBox"?

    Thanks,

    Alex
    ASP, SQL, VB6, Java Script and dubious guitar playing skills.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    UK
    Posts
    164
    Okay I have some of this working the problem was I wasnt calling the UpdateData function.

    Am I right in thinking:
    UpdateData(False) sends data from member variables to controls
    UpdateData(true) sends data from controls to member variables?

    Afx in case anyone is interested is apparently MFC's predecessor and stands for application frame work.

    As I understand it CString is MFCs implementation of String and are basically the same except some MFC stuff expects arguments in the form of CString.

    Alex
    ASP, SQL, VB6, Java Script and dubious guitar playing skills.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width