Press a key.

This is a discussion on Press a key. within the C++ Programming forums, part of the General Programming Boards category; I got some problems here. I want, in windows to be able to simulate that someone pressed a key in ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    10

    Press a key.

    I got some problems here. I want, in windows to be able to simulate that someone pressed a key in another program. I tryed this without success. Maybe there's other ways I don't know or I'm forgetting something...

    Code:
    HWND handle=FindWindow("Program","Program");
    
    SendMessage(handle,WM_KEYDOWN, VK_I, 0);
    SendMessage(handle,WM_KEYUP, VK_I, 0);
    Please help me....

  2. #2
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,493
    no idea here

    try posting this in the windows programming forum.

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    10
    k ill do that thx.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 12:48 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 09:00 AM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM

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