PDA

View Full Version : programming winamp in vb


thetechfreak
3rd May 2002, 08:23
ive put the following in a vb project

<code>
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Dim hwndWinamp as long
hwndWinamp = FindWindow("Winamp v1.x",vbNullString)
</code>

but how do i use it to get title etc... , what is the VB equivalent of sendmessage for C++?

Gourou
4th May 2002, 22:18
ok, first off, to get the title, is not as simple as the two sendmessage commands, because it returns a pointer in winamps memory space, which takes some extra code to get, but for everything else, use this send message api...

Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

if you root around in NSDN, you can find a .h file that has all the send message IPC's all layed out nicely for you :)