Re: Don't want to wait for a returned value from SendMessage???
From: Stoil Marinov (stoil_marinov.OBVIOUS_at_hotmail.com)
Date: 02/24/04
- Next message: MikeD: "Re: Hi word - low word"
- Previous message: Joseph M. Ferris: "Re: Don't want to wait for a returned value from SendMessage???"
- In reply to: BadOmen: "Don't want to wait for a returned value from SendMessage???"
- Next in thread: BadOmen: "Re: Don't want to wait for a returned value from SendMessage???"
- Reply: BadOmen: "Re: Don't want to wait for a returned value from SendMessage???"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 24 Feb 2004 15:08:53 -0600
"BadOmen" <badomen02@hotmail.com> wrote in message news:XVO_b.50150$mU6.201210@newsb.telia.net...
> I am using SendMessageA to send a command to WinAmp and it works, The Open
> File(s)
> is opening but my program halts until I press the Open or Cancel button. I
> think my program is waiting for a returned value that is sent from WinAmp
> when the Cancel or Open button is pressed.
>
> I have a problem with this because I am using a remote to execute this
> command so after I have done that I want to be able to use my remote to move
> and press the mouse button so I can select a file... But because my program
> halts until I have pressed the Open or Close button I cant use the remote to
> move the mouse and open a file... I have to GO to the computer and do it
> manually...
>
> Plz help me with this, otherwise I might get exercise running to my
> computer.. :P
>
>
> Call SendMessageA(WinAMPhWnd, WM_COMMAND, WINAMP_FILE_PLAY, 0)
Use PostMessage() instead:
Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
SendMessage() waits for the other app to process the message before returning back.
PostMessage() returns immediately after posting the message.
Regards,
Stoil
>
> Yours, Jonas
>
>
- Next message: MikeD: "Re: Hi word - low word"
- Previous message: Joseph M. Ferris: "Re: Don't want to wait for a returned value from SendMessage???"
- In reply to: BadOmen: "Don't want to wait for a returned value from SendMessage???"
- Next in thread: BadOmen: "Re: Don't want to wait for a returned value from SendMessage???"
- Reply: BadOmen: "Re: Don't want to wait for a returned value from SendMessage???"
- Messages sorted by: [ date ] [ thread ]