Results 1 to 4 of 4

Thread: Just wondering...about ID's

  1. #1

    Thread Starter
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500

    Question 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.

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  3. #3

    Thread Starter
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500

    Thumbs up Ok

    Ok, chief so i just use the handle
    Amon Ra
    The Power of Learning.

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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
  •  



Click Here to Expand Forum to Full Width