How to get a string from a dialog

This is a discussion on How to get a string from a dialog within the Windows Programming forums, part of the Platform Specific Boards category; I am new to windows programming, and I can not figure out how to get a string from an EDITTEXT ...

  1. #1
    A source of questions... Benji Wiebe's Avatar
    Join Date
    Mar 2011
    Location
    Durham, Kansas
    Posts
    69

    Question How to get a string from a dialog

    I am new to windows programming, and I can not figure out how to get a string from an EDITTEXT resource. Could somebody please show me what to do?

    Example:
    I make a file that contains the following:

    EDITTEXT 3, 10, 10, 100, 10

    The user would type in "Hello", and then press a button called "Test". The program would then pop up a MessageBox that would say, "You typed in 'Hello'."
    I have tried several things but I can't make anything work.


    Compiler: Gnu GCC C compiler

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Look up GetDlgItemText() on msdn.

    And since you're likely to run into this again...

    GetDlgItemInt()
    IsDlgButtonChecked()

    SetDlgItemText()
    SetDlgItemInt()
    CheckDlgButton()

    SendDlgItemMessage()
    PostDlgItemMessage()

    GetDlgItem()

    and more...

  3. #3
    A source of questions... Benji Wiebe's Avatar
    Join Date
    Mar 2011
    Location
    Durham, Kansas
    Posts
    69
    Thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 04-25-2008, 02:45 PM
  2. String Class
    By BKurosawa in forum C++ Programming
    Replies: 117
    Last Post: 08-09-2007, 01:02 AM
  3. String issues
    By The_professor in forum C++ Programming
    Replies: 7
    Last Post: 06-12-2007, 09:11 AM
  4. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 02:23 PM
  5. creating class, and linking files
    By JCK in forum C++ Programming
    Replies: 12
    Last Post: 12-08-2002, 01:45 PM

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