Getting my text from edit box

This is a discussion on Getting my text from edit box within the Windows Programming forums, part of the Platform Specific Boards category; Hey ive been trying to do this simple operation for the last hour and i still can't get it to ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    42

    Getting my text from edit box

    Hey ive been trying to do this simple operation for the last hour and i still can't get it to work


    I have an edit box and a OK button when the user enters some text and clicks OK, i wan't to display the text


    I added a member variable called m_strGet type CString


    Code:
    
    // This is my add member variable CString m_strGet;
    
    
    // My edit box is called IDC_EDIT_TEXTBOX
    
    
    void CSimpleDlg::OnGet() 
    {
    
         UpdateData();
    
    
    	 if(m_strGet.IsEmpty() == FALSE){
                messageBox(m_strGet);
                }
    
    
         UpdateData(FALSE); 
    
    
    }

    It should compile but it doesn't, i get an error saying m_strGet is undefined, but i declared it public with class wizard


    Marky_Mark
    Last edited by Marky_Mark; 11-16-2001 at 12:21 PM.

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,138
    In theory there is nothing wrong with what you posted.
    In reality however, you made at least one typo in your post, so watch out for typos in your program.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    42
    Hey thanks, i got it working now



    Marky_Mark

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. BN_CLICKED, change button style
    By bennyandthejets in forum Windows Programming
    Replies: 13
    Last Post: 07-05-2010, 11:42 PM
  2. Retrieving the text from an edit box
    By chrishowarth in forum Windows Programming
    Replies: 13
    Last Post: 05-13-2007, 06:57 PM
  3. Capture Enter key press in EDIT Box
    By richiev in forum Windows Programming
    Replies: 4
    Last Post: 07-14-2005, 12:03 AM
  4. Edit Box Questions PT. II
    By Quantrizi in forum Windows Programming
    Replies: 16
    Last Post: 08-12-2003, 10:42 PM
  5. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21