あなたは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
);
は小さなアイコンをNULLまたはロードするために3210(小さいアイコン)を設定するかを確認してください。 NULLに設定すると、自動的にhIconで指定されたイメージが使用されます。 LoadImageで小さなアイコンをロードするときは、幅と高さを16に設定し、LR_DEFAULTSIZEフラグを削除する必要があります。透明な部分を持つアイコンの場合は、LR_LOADTRANSPARENTフラグを追加してください。
[documentation](http://msdn.microsoft.com/en-us/library/windows/desktop/ms648045.aspx)から:使用しないでください。 LR_SHAREDは、標準以外のサイズを持つイメージ、ロード後に変更されるイメージ、またはファイルからロードされるイメージ用です。 – Paul