3D controls in a DLL
Branko Zurkovich -- BZURKOVICH@essa.com Wednesday, July 17, 1996 Hi, Environment: Windows95-VC4.1 I've created an application using VC4 and I'm currently testing it under Windows95. The problem I have is following: The application is statically linked and it works OK. If I create a DLL (instead of a stand alone application) call the exported functions from another application (ArcView 2.1), the exported dialog boxes don't have 3D look and feel. In InitInstance() I'm using: #ifdef _AFXDLL Enable3dControls(); // Call this when using MFC in a shared DLL #else Enable3dControlsStatic(); // Call this when linking to MFC statically #endif to load the proper 3D dlls but Enable3dControlsStatic(); asserts because it won't work in a DLL.. I hope that this explains my problem and that someone has experienced this before... Thanks Branko
Matt McConnell -- mjm28@po.cwru.edu Monday, October 28, 1996 Enviroment: Win NT3.51, VC++ 4.1, Excel 7.0 I'm writting a MCF DLL that will show various dialogs for an excel wizard. I'm using VBA in excel to call the dialogs. The problem I'm having is that the function Enable3dControlsStatic contains an assertion. The code is commented that this function should only be called from an application not a DLL. BOOL CWinApp::Enable3dControlsStatic() { ASSERT(!afxContextIsDLL); // Should only be called by apps When I build this in Release mode it seems to work alright (in release mode ASSERT is ignored). I am wondering if there are any side effects that I'm missing. I noticed that in MFC 2.0 this assertion isn't there. Did this just get added as a warning not to load the 3d controls in a DLL that is called from an application that also loads the 3d control DLL. Thanks Matt ---------------------------------- Matt McConnell (KC8AWM) Phi Kappa Psi (Ohio Epsilon) Case Western Reserve University Dept of Electrical Engineering and Applied Physics
| Вернуться в корень Архива |