Code Repo    |     RSS
MD's Technical Sharing



Monday, February 16, 2009

Draw an icon from resource

g_hIcon = (HICON)LoadImage((HINSTANCE)GetModuleHandle(IMAGENAME), MAKEINTRESOURCE(IDI_ICON1), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);

DrawIcon(hdc, left, top, g_hIcon);


IMAGENAME is the name the the current DLL/EXE file. The icon must be created using VS resource editor and its ID set to IDI_ICON1

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.