I have a MFC dialog application with a picture control. I add an icon file with different size of images (32x32, 48x48, etc...) into the icon resource. Then I set the following picture control properties:
Type - Icon Real Size Image - True
I have the following code under OnInitDialog():
HICON hIcon = (HICON) LoadImage( AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_PONCAD),IMAGE_ICON, 48, 48, LR_DEFAULTCOLOR );
m_Icon1.SetIcon( hIcon );
The icon did get displayed but the problem is that the icon is cropped off. I think the total display windows is still 32x32. So part of the icon is missing.
How to get the icon displays in size 48x48 properly?
Thank you.