Getting string from text box

This is a discussion on Getting string from text box within the Windows Programming forums, part of the Platform Specific Boards category; I am a programmer in C. I have not yet started to program Windows in C, but my curiousity has ...

  1. #1
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584

    Getting string from text box

    I am a programmer in C. I have not yet started to program Windows in C, but my curiousity has been aroused. How would you get a string from a text box, let's say, when the use clicks the command, "Convert"? Thanks.
    1978 Silver Anniversary Corvette

  2. #2
    zen
    zen is offline
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    By using GetDlgItemText().

  3. #3
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    What library is that in? Windows.h? Thanks.
    1978 Silver Anniversary Corvette

  4. #4
    zen
    zen is offline
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    Yeah, it's declared in a header file that's included in windows.h. Check MSDN for details.

  5. #5
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    Thanks! Oh, and thanks for the link. I was looking for a site that had the resources for libraries. Thanks again!
    1978 Silver Anniversary Corvette

  6. #6
    Registered User morbuz's Avatar
    Join Date
    Aug 2001
    Posts
    35

    Unhappy Confused...

    Can anyone post a small code snippet that shows how GetDlgItemText() is used?

    I would really appreciate it...
    [Signature here. (Remove this!)]

  7. #7
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,854
    This is from a logon dialog.

    //*******************************
    case IDC_USERNAME:

    if (EN_CHANGE == HIWORD(wParam))
    {
    GetDlgItemText(hwnd,IDC_USERNAME,sName,STRING);
    }
    break;
    //*******************************

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. RicBot
    By John_ in forum C++ Programming
    Replies: 8
    Last Post: 06-13-2006, 06:52 PM
  2. Replies: 4
    Last Post: 03-03-2006, 01:11 AM
  3. New Theme
    By XSquared in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 04-01-2004, 07:00 PM
  4. 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
  5. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM

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