How would I make a text box for the user to type in??
Printable View
How would I make a text box for the user to type in??
Use an edit box control.
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);
It says hwndEdit undeclared and ID_VIEW undeclared!!
try adding
hwnd hwndEdit;
and
#define ID_VIEW 1
into your code.
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 :p
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...)
yeah, I hate his windows tut's for some odd reason.
I tried Sunlight's tutorials once...very confusing to say the least!
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 :). :rolleyes:
SPH :p
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).
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.
My post was aimed more at Sean's mail.