quote:
Originally posted by Patchou
code:
HWND hWinamp = FindWindow(_T("Winamp v1.x"), NULL);
if(hWinamp)
{
TCHAR sTitle[1024]; ZeroMemory(sTitle, 1024*sizeof(TCHAR));
GetWindowText(hWinamp, sTitle, 1024);
if(sTitle[0] != '\\0')
{
//Remove everything after the WinAmp marker
for(int i = _tcsclen(sTitle)-9; i > 0; i--)
{
if(_tcsnicmp(sTitle+i, _T(" - Winamp"), 9) == 0)
{
sTitle[i] = '\\0';
break;
}
}
}
}
i dunno what to say patch, our code is identicle in everyway (except mine is vb and yours is c++ but i will post an image and show you it)
take a look at the forms caption and look at the first item in my taskbar , the winamp title is scrolling
and yes im aware of the
code:
TheText = Replace(TheText, " [Paused]", "")
is there twice