|
|
LoadIcon(HINSTANCE hInstance, LPCTSTR lpIconName)
function.
|
|
|
|
HBITMAP bmp = CreateBitmap(s.xHotspot,s.yHotspot,1,32,NULL);
|
|
hicon = (HICON)LoadImage(NULL, "C:\\acrobat.ico", IMAGE_ICON, 0 , 0 , LR_LOADFROMFILE|LR_SHARED);
MSDN wrote: |
---|
HANDLE WINAPI LoadImage( _In_opt_ HINSTANCE hinst, _In_ LPCTSTR lpszName, _In_ UINT uType, _In_ int cxDesired, _In_ int cyDesired, _In_ UINT fuLoad ); cxDesired [in] Type: int The width, in pixels, of the icon or cursor. If this parameter is zero and the fuLoad parameter is LR_DEFAULTSIZE, the function uses the SM_CXICON or SM_CXCURSOR system metric value to set the width. If this parameter is zero and LR_DEFAULTSIZE is not used, the function uses the actual resource width. |
MSDN wrote: |
---|
LR_SHARED
Do not use LR_SHARED for images that have non-standard sizes, that may change after loading, or that are loaded from a file. When loading a system icon or cursor, you must use LR_SHARED or the function will fail to load the resource. This function finds the first image in the cache with the requested resource name, regardless of the size requested. |
|
|
|
|
|
|