INFO: Microsoft Foundation Classes Do Not Support QuickWin Apps

Last reviewed: July 22, 1997
Article ID: Q102621

The information in this article applies to:
  • The Microsoft Foundation Classes (MFC) included with:

        - Microsoft C/C++, version 7.0
        - Microsoft Visual C++ for Windows, versions 1.0, 1.5
    

SUMMARY

You cannot develop a QuickWin application with the Microsoft Foundation Class (MFC) Libraries versions 1.0 and 2.0. The libraries were not designed or tested for use with QuickWin applications and may not work correctly.

MORE INFORMATION

A QuickWin application is designed to provide a fast method to convert an application designed for the MS-DOS operating system into an application designed for the Microsoft Windows operating system. If you developed an MS- DOS application with the Microsoft Foundation Classes you may be able to create a QuickWin application that uses that part of the Microsoft Foundation Classes that supports MS-DOS applications. Microsoft did not design or test the Microsoft Foundation Classes libraries in this manner and does not support using them for this purpose. You can build a QuickWin application using the Microsoft Foundation Classes libraries by performing the following five steps; however, do so only at your own risk:

  1. In the Visual Workbench, Project Options from the Options menu, select QuickWin application as the Project Type.

  2. Remove the check box from "Use Microsoft Foundation Classes." If you choose this check box, Visual Workbench links in the Windows version of the Microsoft Foundation Classes library.

  3. In the Linker Options, set the "Prevent Use of Extended Dictionary" check box.

  4. Manually add the appropriate MS-DOS version of the Microsoft Foundation Classes library to the library list for either the debug or release build (for example, MAFXCR, MAFXCRD, and so on). Verify that the appropriate Microsoft Foundation Classes library is listed first in the Linker Options.

  5. Verify that _DOS is defined when you include <AFX.H> and that _WINDOWS is not defined. Include the file with the following lines of code:

          #ifdef _WINDOWS
    
             #undef _WINDOWS
             #define _DOS
             #include <afx.h>
             #undef _DOS
             #define _WINDOWS
          #endif
    
    
The following code example demonstrates this procedure:

Sample Code

   /*
    * Compiler options needed: See above
    */

   #ifdef _WINDOWS
      #undef _WINDOWS
      #define _DOS
      #include <afx.h>
      #undef _DOS
      #define _WINDOWS
   #endif

   #include <iostream.h>

   void main()
   {
      CString myString ("Hello, world");
      cout << myString << endl;
   }


Additional query words: checkbox
Keywords : kb16bitonly MfcMisc kbinfo
Technology : kbmfc
Version : 1.0 1.50 7.0


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.