आप LoadImage
उपयोग कर सकते हैं:
wcex.hIcon = (HICON) LoadImage(// returns a HANDLE so we have to cast to HICON
NULL, // hInstance must be NULL when loading from a file
"iconfile.ico", // the icon file name
IMAGE_ICON, // specifies that the file is an icon
0, // width of the image (we'll specify default later on)
0, // height of the image
LR_LOADFROMFILE| // we want to load a file (as opposed to a resource)
LR_DEFAULTSIZE| // default metrics based on the type (IMAGE_ICON, 32x32)
LR_SHARED // let the system release the handle when it's no longer used
);
सुनिश्चित करें कि करने के लिए या तो wcex.hIconSm
(छोटे चिह्न) शून्य या एक छोटा सा आइकन लोड करने के लिए निर्धारित किया है। जब आप इसे पूर्ण पर सेट करते हैं, तो यह स्वचालित रूप से हिचॉन द्वारा निर्दिष्ट छवि का उपयोग करेगा। जब आप LoadImage के साथ एक छोटा आइकन लोड करते हैं, तो आपको चौड़ाई और ऊंचाई 16 पर सेट करनी चाहिए और LR_DEFAULTSIZE ध्वज को हटा देना चाहिए। यदि यह पारदर्शी भागों के लिए डिज़ाइन किया गया एक आइकन है, तो LR_LOADTRANSPARENT ध्वज
स्रोत
2012-11-02 00:57:04
[दस्तावेज़] से [http://msdn.microsoft.com/en-us/library/windows/desktop/ms648045.aspx): उपयोग न करें उन छवियों के लिए LR_SHARED जिनमें गैर मानक आकार हैं, जो लोड होने के बाद बदल सकते हैं, या जिन्हें फ़ाइल से लोड किया जा सकता है। – Paul