Question and Answer Database FAQ2003C.txt How do I enable the 3D controls? Category :OWL Platform :All Product :BC++ 5.x Question: Whenever I try to enable the 3D controls in OWL they are not enabled? What the heck is the problem? Answer: This is the result of a bug. When we check the OS version in applicat.cpp (to make sure we don't use the 3D Controls in 3.1), we check the wrong thing. The fix for this is either to include the applicat.cpp source file in your project and change the line where we check this from GetMajorVersion to GetMinorVersion. (Yes it is correct as GetMajorVersion, but in the WinSys/system.h header (a microsoft header) it checks the byte the wrong way). If you do this you have to link statically. Or you can Rebuild the OWL libraries, after changing the above problem. Here is the code in applicat.cpp that you need to change-- // // Enable or disable the use of the CTL3D DLL. Loads it on demand if needed. // void TApplication::EnableCtl3d(bool enable) { // As per Article Q125684 of Microsoft Development Library: // "If major version is 4 or greater, the application should not // implement CTL3D". // 'How to Use CTL3D Under the Windows 95 Operating System' // /*if (TSystem::GetMajorVersion()>= 4) OLD STATEMENT*/ if (TSystem::GetMinorVersion()>= 4) //corrected return; // Load the Ctl3d DLL if needed & register our instance // if (enable) { if (!Ctl3dModule) { try { Ctl3dModule = new TCtl3dDll(); Ctl3dModule->Register(*this); } catch (...) { TRACEX(OwlApp, 0, "Unable to create instance of TCtl3dDll"); return; } } } Ctl3dOn = enable; } 7/2/98 10:32:32 AM
Last Modified: 01-SEP-99