How do I make a text box??

This is a discussion on How do I make a text box?? within the Windows Programming forums, part of the Platform Specific Boards category; How would I make a text box for the user to type in??...

  1. #1
    BubbleMan
    Guest

    Question How do I make a text box??

    How would I make a text box for the user to type in??

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Use an edit box control.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230

    here yah go

    This is how you do it on a normal window:
    Code:
              hwndEdit = CreateWindow ("edit", NULL,
                             WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL |
                                       WS_BORDER | ES_LEFT | ES_MULTILINE |
                                       ES_AUTOHSCROLL | ES_AUTOVSCROLL,
                             0, 0, 0, 0, hwnd, (HMENU) ID_VIEW,
    						 hInst, NULL);

  4. #4
    BubbleMan
    Guest

    Question Didn't work...(errors)

    It says hwndEdit undeclared and ID_VIEW undeclared!!

  5. #5
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230

    sigh...

    try adding

    hwnd hwndEdit;

    and

    #define ID_VIEW 1

    into your code.

  6. #6
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230

    ack!!

    Ok, see where in the code it says

    0,0,0,0 all in a row like that? Change it to
    0,0,200,200 if you actually want to SEE the editbox

  7. #7
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,657
    Cute mistake though...

    My first window I accidentally created it out of range of the screen, so for an hour I just kept clicking the Taskbar Icon that was *swearing* the window was active and visible... till of course I noticed it peaking from the edge of the screen...

    And thanks for the code Ken, I was actually about to post the same question(Sunlight confuses me!! --Argh...)



    ITSA
    Socket Library!

  8. #8
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    yeah, I hate his windows tut's for some odd reason.

  9. #9
    aurė entuluva! mithrandir's Avatar
    Join Date
    Aug 2001
    Posts
    1,209
    I tried Sunlight's tutorials once...very confusing to say the least!

  10. #10
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Sunlight... :p

    Sunlight was a bit full of himself, not a very good teacher, never gave any answers, just "See my tuts" "Look @ the FAQ". We could ourselves to do that, when we post something we want REAL and HUMAN help .

    SPH

  11. #11
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Sunlight answered many questions and helped a lot of people here, and elsewhere. If you don't like his tutorials, there are many others - search google, you'll find hundreds. If you don't like his style, don't read his replies, (your loss of course).
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  12. #12
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230

    eh..

    Never said I didn't like him, I thought he was great, and a very intelligent person, all I said was that his tutorials confused me...that's what drove me to pick up petzold's.

  13. #13
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    My post was aimed more at Sean's mail.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Obtaining a value from a text box
    By thetinman in forum Windows Programming
    Replies: 1
    Last Post: 11-23-2006, 04:50 PM
  2. Converting a text box value into a character array?
    By n00bguy in forum Windows Programming
    Replies: 3
    Last Post: 07-29-2006, 08:08 PM
  3. Adding text to a disabled edit box
    By osal in forum Windows Programming
    Replies: 1
    Last Post: 06-16-2004, 01:23 PM
  4. New Theme
    By XSquared in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 04-01-2004, 07:00 PM
  5. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 06:35 PM

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