Can't create a DLL dialog box object
-
Hi I created a Dialog box class within a MFC share Regular DLL. I use the Resource Wizard to create the Dialog and Class Wizard to define the derived class. I'm exporting the class with the _declspec(dllexport) storage class type specifier. When I try to create an object of that derived Dialog box class in the client application... the object pointer is NULL. I get no errors. The DLL is loaded at load-time, the DLL Library is included in the linker. Do you know what step(s) I might be leaving out ?? One person suggested adding the AFX_MANAGE_STATE macro... but, none of the CDialog base functions are being re-defined. So, I'm exporting the Dialog Box functions indirectly... adding the AFX_MANAGE_STATE macro at the begain of the exported functions is not feasible. Besides, I create a Regular MFC DLL function that used a device context pointer and CBrush class... and I did not include the AFX_MANAGE_STATE macro. Thx, King
-
Hi I created a Dialog box class within a MFC share Regular DLL. I use the Resource Wizard to create the Dialog and Class Wizard to define the derived class. I'm exporting the class with the _declspec(dllexport) storage class type specifier. When I try to create an object of that derived Dialog box class in the client application... the object pointer is NULL. I get no errors. The DLL is loaded at load-time, the DLL Library is included in the linker. Do you know what step(s) I might be leaving out ?? One person suggested adding the AFX_MANAGE_STATE macro... but, none of the CDialog base functions are being re-defined. So, I'm exporting the Dialog Box functions indirectly... adding the AFX_MANAGE_STATE macro at the begain of the exported functions is not feasible. Besides, I create a Regular MFC DLL function that used a device context pointer and CBrush class... and I did not include the AFX_MANAGE_STATE macro. Thx, King
-
Hi I try adding that code to the client app and hRes is a NULL HINSTANCE pointer. also, I'm not sure where the problem lies, in the DLL or the Client ??