共用方式為


CImage::LoadFromResource

Loads an image from a BITMAP resource.

void LoadFromResource( 
   HINSTANCE hInstance, 
   LPCTSTR pszResourceName  
) throw(); 
void LoadFromResource( 
   HINSTANCE hInstance, 
   UINT nIDResource  
) throw();

Parameters

  • hInstance
    Handle to an instance of the module that contains the image to be loaded.

  • pszResourceName
    A pointer to the string containing the name of the resource containing the image to load.

  • nIDResource
    The ID of the resource to load.

Remarks

The resource must be of type BITMAP.

Requirements

Header: atlimage.h

See Also

Reference

CImage Class

CImage::Load