Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Send a keystroke to a hwnd window
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00889676
Message ID:
00889729
Views:
21
>I was hoping something like the below would work, but even though I can grab the window, postmessage does not work.
>
>
>DECLARE INTEGER FindWindow IN Win32API AS FindWindow STRING, STRING
>
>lnwindow = FindWindow(0,tcTitle)
>IF lnwindow > 0
>   #DEFINE WM_KEYDOWN  0x0100
>
>    DECLARE SHORT PostMessage IN user32;
>      INTEGER   hWnd,;
>      INTEGER   Msg,;
>      STRING  @ wParam,;
>      INTEGER   lParam
>
>	hwnd = lnwindow
>	cmessage = 'password'+CHR(13)
>	ReturnValue = PostMessage(hwnd, WM_KEYDOWN, @cmessage, 0)
>	RETURN .T.
>ELSE
>	RETURN .F.
>ENDIF
>
Try SendMessage instead.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform