Go Back   Winamp Forums > Developer Center > Winamp Development

 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 1st June 2002, 20:51   #1
RogueProtoKol
Junior Member
 
Join Date: Jun 2002
Posts: 5
gettin winamp window title

Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long


Private Sub Form_Load()
Dim hwndWinamp As Long
hwndWinamp = FindWindow("Winamp v1.x", vbNullString)

sWindowText = Space(255)
r = GetWindowText(hwndWinamp, sWindowText, 255)
sWindowText = Left(sWindowText, r)

MsgBox sWindowText
End Sub

-------------------------------------------
thats the code i have atm, as far as i can see
that *should* fill swindowtext with the winamp
window title... but it doesn't, i end up with
the length of the title in spaces... but not the title!!

what am i doing wrong ?
RogueProtoKol is offline   Reply With Quote
 
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump