What steps are required to convert a VC++ 2.2 OCX project to Visual C++ 4.0?
• Load and convert the project in VC++ 4.0. • Under Build/Settings remove the references to the OCS*.dll files. You’ll find the references under the “Link” tab in the “Object/library Modules” area. You’ll need to do this for all of your targets (e.g., Debug/Release/ANSI/Unicode). • Try to compile and link. If you get any errors check out steps 4 and 5 below. • Due to a more stringent conformance to the draft C++ standard, some of your method calls may not compile. Here’s an example of where I had to make some changes: • ///////////////////////////////////////////////////////////////////////////// // CMyCtrl::OnDraw – Drawing function void CMyCtrl::OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid) { … // Get the text and draw it pdc->DrawText( InternalGetText(), -1, rcBounds, DT_LEFT | DT_WORDBREAK ); // This worked in VC++ 2.x, but it won’t work now. You will get a 2664 error because // we are passing a const reference to a method that requires a non-const pointer // Cr