Results 1 to 4 of 4

Thread: key down

  1. #1

    Thread Starter
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    key down

    Whenever I have an object on the window, for instance an EDIT, BUTTON, whatever, I try to use:
    Code:
    switch(msg){
    case WM_KEYDOWN:
    MessageBox(hwnd,"Hey sob","",0);
    break;
    }
    It just doesn't seem to work. Anyone know why? I suppose it's because the focus is not onto the main window, rather to the EDIT OR WHATEVER.

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    yep right.
    Since I don't know where this code you posted is, I cannot give any precise answer, but your guess seems right.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810
    Originally posted by CornedBee
    yep right.
    Since I don't know where this code you posted is, I cannot give any precise answer, but your guess seems right.
    I'm sorry?
    I just have a question: "Once I have controls on a window, the default switch(msg){case WM_KEYDOWN} just seem don't work"

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    "The keydown messages are only sent to the window that has the input focus. Once you created controls, there is a good chance that one of them has the input focus."
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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