以下函数获取ICON的大小存入cx,cy
void GetIconSize(HICON hIcon, int* cx, int* cy)
{
ICONINFO ici;
::GetIconInfo(hIcon, &ici);
BITMAP bm;
::GetObject(ici.hbmColor, sizeof(BITMAP), &bm);
*cx = bm.bmWidth;
*cy = bm.bmHeight;
::DeleteObject(ici.hbmColor);
::DeleteObject(ici.hbmMask);
}