CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 1999
    Posts
    160

    How to get CEdit Value

    Hello:
    I use VC++6.0 MFC.Built a Dialog class.
    I add a CEdit myEdit.If I can get the value of
    myEdit use other (Dialog)exe file?
    Welcome any advices!Thank you very much.
    Still waiting.



  2. #2
    Join Date
    May 2000
    Posts
    160

    Re: How to get CEdit Value

    Get a Mouse cursor and then compare controls on wich mose is positioned with CEdit and then GetWindowText(). If you want something else please let me now

    Regards,
    Oliviu


  3. #3
    Join Date
    Jan 2000
    Location
    San Diego, CA
    Posts
    1,334

    Re: How to get CEdit Value

    If you defined the myEdit using Class Wizard, then it is public and can be accessed from outside the class:

    CMyDialog doit;
    CString foo;

    doit.myEdit = "test";
    doit.DoModal();

    // you can use the value in this function
    foo = doit.myEdit;

    // you can pass the value to another dialog
    CAnotherDialog bash;
    bash.amotherEdit = doit.myEdit;





  4. #4
    Join Date
    Aug 1999
    Posts
    160

    Re: How to get CEdit Value

    Yes:
    I want to do it.But I want to know if I
    can do it not use mouse case.
    Example: My Dialog name is "HelloDialog",my CEdit is myEdit,ID is "IDC_MYCHECK" in the Dialog.
    Could you give me some sample code?How to get myEdit value ?

    Thank you very much!




  5. #5
    Guest

    Re: How to get CEdit Value

    Hi buddy,
    try to this code:
    CString Str;
    GetDlgItemText(IDC_MYCHECK,Str);
    Here Str have the value of your edit controls.
    All the best.
    srinu



  6. #6
    Join Date
    Jan 2000
    Posts
    72

    Re: How to get CEdit Value

    I am unable to understand what do you want? What do you mean by "If I can get the value of myEdit use other (Dialog)exe file?"


    --- Rating a good post motivates me ---
    Mukhtar

  7. #7
    Join Date
    May 2000
    Posts
    160

    Re: How to get CEdit Value

    Right now I can't send you some example code because I'm 7 days out of office. But you can look at process help. Try to find the id of process created by your Dialog application and the rest is easy. I hope I can send you an example net week.

    Regards,
    Oliviu


  8. #8
    Join Date
    Aug 1999
    Posts
    160

    Re: How to get CEdit Value

    Thank you:
    I am doing this use your advice.But I think
    maybe I will see you next week?(:-)



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

Featured