Does anyone know how to change the start button image through some API call?
I manage to get the Start Button handle, but fail to change the image...enclose is the sample code
regaards,PHP Code:HWND hWnd=NULL;
HBITMAP hBitmap=NULL;
long x=0;
hWnd = FindWindow("Shell_TrayWnd",NULL);
if (hWnd != NULL)
{
hWnd = FindWindowEx(hWnd, NULL, "Button", NULL);
if (hWnd != NULL)
{
hBitmap = static_cast<HBITMAP>(LoadImage(hInst, (LPCTSTR)IDB_MYBUTTON, IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE));
x = SendMessage(hWnd, BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBitmap);
}
}




enclose is the sample code
Reply With Quote