[fpc-pascal]Wiindows API calls.

MPDJ MPDJ at btinternet.com
Sat Oct 14 23:38:07 CEST 2000


Hi,

I'm new to FPC under Windows, and I'm having trouble finding any information
on using Windows API calls. I've cut a snippet from the WinAmp website,
which is what I'm trying to control:



External applications can find the Winamp window using the following piece
of code (written in C, but other languages that support the Win32 API should
be very similar).

HWND hwndWinamp = FindWindow("Winamp v1.x",NULL);


Winamp responds to three messages in particular: WM_USER, WM_COMMAND, and
WM_COPYDATA. WM_USER and WM_COPYDATA allow you to control some of the more
advanced aspects of Winamp while WM_COMMAND lets you do simple things such
as simulate the pause button being pressed.



#define IPC_STARTPLAY 102

/*
** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_STARTPLAY);
**
** Using IPC_STARTPLAY is like hitting 'Play' in Winamp, mostly.
*/


All the source examples are in C/C++. Can anyone help me with a small
example snippet, or point me in the right direction with a link !?

I'd be more than grateful.


Andy


PS. Sorry if this topic has come up before, but I've only been on the
mailing list a couple of months.





More information about the fpc-pascal mailing list