How do you draw an icon inside a window in C++ WINAPI? -
what i'm trying create chess game in c++ through winapi, , since haven't ever studied them @ school i'm having problems (online documentation quite bad, wasn't able find example of how this) printing .ico file transparency inside window. aldready managed bitmap image photoshop doesn't let me save .bmp file alpha channels , had go supported winapi , allowed transparency (therefore .ico).
my question is, how draw transparent .ico file inside window?
thank you!
i got how it, i'll post code:
hicon = (hicon) loadimage( // returns handle have cast hicon null, // hinstance must null when loading file "favicon.ico", // icon file name image_icon, // specifies file icon 0, // width of image (we'll specify default later on) 0, // height of image lr_loadfromfile| // want load file (as opposed resource) lr_defaultsize| // default metrics based on type (image_icon, 32x32) lr_shared // let system release handle when it's no longer used ); drawiconex( hdc, 100, 200,hicon, 72, 78, 0, null, di_normal);
but i'm running additional problem: icon more double of 32x32 (it 72x78) , picture getting aliased. there way solve this? thanks!
Comments
Post a Comment