Click here to Skip to main content
15,885,366 members

Comments by Dimitrios Fountoukidis (Top 2 by date)

Dimitrios Fountoukidis 22-Oct-15 6:14am View    
I have also tried the following

CRuntimeClass* point = RUNTIME_CLASS(CMyClass);
CRuntimeClass* pClass = CRuntimeClass::FromName(point->m_lpszClassName);

Although point was successfully created but pClass returned as NULL.

Do i need to declare or include any library in my code?
Dimitrios Fountoukidis 22-Oct-15 5:48am View    
Thanks but as per below, didn't work

CStringA strClass("CMyClass");
CRuntimeClass * pClass = CRuntimeClass::FromName(strClass);

Still returns NULL

Also as per MS: FromName accepts:

static CRuntimeClass* PASCAL FromName(
LPCSTR lpszClassName
);
static CRuntimeClass* PASCAL FromName(
LPCWSTR lpszClassName
);

thanks again