SetIcon
Sets a picture from a HICON to be displayed in the control
BOOL SetIcon( HICON hIcon, BOOL bTakeOwnership = TRUE )
return true when successful else false
EX1
#include <Control.h> #include <OC_Res.h> void PictureControl_SetIcon() { PictureControl pc; HINSTANCE hinstOrg = GetModuleHandle(); if(!hinstOrg) return ; HICON hIcon = NULL; { char *lpcszID = (char*)IDI_FOLDER_CLOSED; hIcon = LoadImage(hinstOrg, lpcszID, IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR); } pc.SetIcon(hIcon); }
Control.h