This topic has not yet been rated - Rate this topic

AfxFindResourceHandle

Updated: June 2010

Use AfxFindResourceHandle to walk the resource chain and locate a specific resource by resource ID and resource type.

HINSTANCE AFXAPI AfxFindResourceHandle(
   LPCTSTR lpszName,
   LPCTSTR lpszType 
);
lpszName

A pointer to a string containing the resource ID.

lpszType

A pointer to the type of resource. For a list of resource types, see FindResource in the Windows SDK.

A handle to the module that contains the resource.

AfxFindResourceHandle finds the specific resource and returns a handle to the module that contains the resource. The resource might be in any extension DLL you have loaded. AfxFindResourceHandle tells you which one has the resource.

The modules are searched in this order:

  1. The main module (if it is an extension DLL).

  2. Non-system modules.

  3. Language-specific modules.

  4. The main module (if it is a system DLL).

  5. System modules.

Header: afxwin.h

Date

History

Reason

June 2010

Added module search order.

Customer feedback.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ