|
-
Jun 21st, 2001, 03:15 PM
#1
Thread Starter
Hyperactive Member
Just wondering...about ID's
I have a handle
Code:
HWND hbtnGetHandle; //get the handle
and this to create a button:
Code:
hbtnGetHandle = CreateWindowEx(NULL,"BUTTON","Get Handle",
WS_CHILD | WS_VISIBLE, 7, 7, 90, 20, hwnd,
NULL, g_hInst, NULL);
How do I set it so that in the wndproc, i can use a switch case
and use ID_SOMETHING? Is it in LOWORD(wParam)? if so, how do i set the id to the wParam of the button?
Amon Ra
The Power of Learning.
-
Jun 21st, 2001, 03:33 PM
#2
Monday Morning Lunatic
You can't associate an ID with a window unless you create a dialogue-box template in memory, and create from there (painful and not recommended).
In the window procedure, I think it's lParam contains the window handle.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 21st, 2001, 03:47 PM
#3
Thread Starter
Hyperactive Member
Ok
Ok, chief so i just use the handle
Amon Ra
The Power of Learning.
-
Jun 21st, 2001, 03:58 PM
#4
Monday Morning Lunatic
Yep If you use dialogue boxes the ID is passed separately (can't remember so check the docs)
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|