HICON LoadIcon(
HINSTANCE hInstance, // handle to application instance
LPCTSTR lpIconName // icon-name string or icon resource
// identifier
);
LoadIcon can only load an icon whose size conforms to the SM_CXICON and SM_CYICON system metric values. Use the LoadImage function to load icons of other sizes.
HANDLE LoadImage(
HINSTANCE hinst, // handle of the instance containing the image
LPCTSTR lpszName, // name or identifier of image
UINT uType, // type of image
int cxDesired, // desired width
int cyDesired, // desired height
UINT fuLoad // load flags
);
然后可以供CStatic、CButton等的SetIcon成员函数使用。