i have these code for add a persistence image to a control:
(for the image be showed the control must have SS_BITMAP style... if you want another format, don't forget change the style and in SendMessage() function)
void setImage(string FileName)
//handle the image
HBITMAP hImage =(HBITMAP)LoadImage(NULL,FileName.c_str(),IMAGE_BITMAP,20,20,LR_LOADFROMFILE);
//add it to control
STM_SETIMAGE,//it's the sendmessage 'command'
(WPARAM)IMAGE_BITMAP,//type\format of image
reinterpret_cast<LPARAM>(hImage));//the HBITMAP image
but i see 2 problems:
1 - the image is stretch to control... why?
2 - why the text isn't showed?