#include <windows.h> #include <CommCtrl.h> #include <commoncontrols.h> int WINAPI WinMain( HINSTANCE /* hInstance */, HINSTANCE /* hPrevInstance */, LPSTR /* lpCmdLine */, int /* nCmdShow */ ) { HDC hdc = NULL; hdc = GetDC(0); SHFILEINFO sfi = {0}; SHGetFileInfo("C:\Program Files\Internet Explorer\iexplore.exe", -1, &sfi, sizeof(sfi), SHGFI_SYSICONINDEX); IImageList* imageList; SHGetImageList(SHIL_JUMBO, IID_IImageList, (void**)&imageList); HICON hIcon; imageList->GetIcon(sfi.iIcon, ILD_TRANSPARENT, &hIcon); DrawIconEx(hdc, 0, 0, hIcon, 256, 256, NULL, NULL, DI_NORMAL); imageList->Release(); DestroyIcon(hIcon); ReleaseDC(0,hdc); return 0; }