using wParam and lParam in keypress simulation 
Author Message
 using wParam and lParam in keypress simulation

hi

i have the lParam and wParam given to me by a Keyboard Hook.

How do I simulate the key pressedby the user?

I have tried the following :

 PGUITHREADINFO lpgui;
  GetGUIThreadInfo(NULL, lpgui);
::PostMessage (lpgui->hwndFocus, WM_KEYDOWN, wParam, lParam);

Did not work. Even tried the simple following:

::PostMessage (::GetActiveWindow (), WM_KEYDOWN, wParam, lParam);

Did not work.

Any ideas?

I was able to simulate the keypress using keybd_event as follows:

keybd_event (wParam, NULL, NULL, NULL). But how do i use lParam too? I
cannot ignore the information in lParam

thanks



Wed, 14 Sep 2005 11:21:46 GMT  
 using wParam and lParam in keypress simulation
Dont forget WM_KEYUP..

On Sat, 29 Mar 2003 15:51:46 +0530, "Michelle Stone"

Quote:

>hi

>i have the lParam and wParam given to me by a Keyboard Hook.

>How do I simulate the key pressedby the user?

>I have tried the following :

> PGUITHREADINFO lpgui;
>  GetGUIThreadInfo(NULL, lpgui);
>::PostMessage (lpgui->hwndFocus, WM_KEYDOWN, wParam, lParam);

>Did not work. Even tried the simple following:

>::PostMessage (::GetActiveWindow (), WM_KEYDOWN, wParam, lParam);

>Did not work.

>Any ideas?

>I was able to simulate the keypress using keybd_event as follows:

>keybd_event (wParam, NULL, NULL, NULL). But how do i use lParam too? I
>cannot ignore the information in lParam

>thanks



Thu, 15 Sep 2005 00:44:11 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Information about the function OnHelpHitTest(WPARAM, LPARAM lParam)

2. pass an string pointer using WPARAM or LPARAM

3. lParam/wParam

4. WPARAM and LPARAM ...

5. Getting the original wParam/lParam for DefWindowProc

6. Retrieving wParam and lParam in ON_COMMAND handler

7. lParam and wParam

8. SendingCommand , LPARAM and WPARAM ?

9. Passing Strings or structures to a message handler through WPARAM and LPARAM

10. how to use wparam and lparam

11. WPARAM & LPARAM

12. wparam, lparam

 

 
Powered by phpBB® Forum Software