HICON -> DIB
i_DIB GetIcon_DIB (LPCTSTR filePath,const long size=300) { i_DIB dib ; HICON hIcon = ::DImageS_GetIcon(filePath) ; if (hIcon != NULL) { MemoryDC memDC ; memDC.Init(CSize(size,size),32) ; CDC* mem_dc = memDC.GetMemoryDC() ; mem_dc->FillSolidRect(CRect(0,0,size,size),RGB(240,240,255)) ; ::Icon_Draw(mem_dc->GetSafeHdc(),CRect(10,10,size-10,size-10),hIcon,TRUE,TRUE) ; dib = ::ToDIB(memDC) ; memDC.Term() ; ::DestroyIcon(hIcon) ; } return dib ; }