GXCreateObjectFromResource
CObject* GXCreateObjectFromResource(LPCTSTR lpszResourceName, LPCTSTR lpszType, CRuntimeClass* pRuntimeClass);
lpszResourceName
Points to the null-terminated string that contains the name of the binary resource.
lpszType
Points to the null-terminated string that contains the resource type, e.g., “LAYOUT”.
pRuntimeClass
Pointer to the runtime class information for the object to be instantiated.
Return Value
A pointer to the allocated object; NULL if an object of the given runtime class could not be found in the binary resource.
Remarks
Instantiates an object of the given runtime class and loads its data from the given binary resource.
If the runtime class of object stored in the given file does not match pRuntimeClass the method will not read the object and return NULL.
Example:
CGXGridParam* pParam = (CGXGridParam*) GXCreateObjectFromResource(
_T(“LAYOUT1”), GXLAYOUT, RUNTIME_CLASS(CGXGridParam));