Initializing the Graphics Library from an Application

Last reviewed: July 17, 1997
Article ID: Q70787
6.00 6.00a 6.00ax 7.00 | 6.00 6.00a | 1.00
MS-DOS                 | OS/2       | WINDOWS
kbprg

The information in this article applies to:

  • The C Run-time (CRT), included with:

        - Microsoft C for MS-DOS, versions 6.0, 6.0a, and 6.0ax
        - Microsoft C for OS/2, versions 6.0 and 6.0a
        - Microsoft C/C++ for MS-DOS, version 7.0
        - Microsoft Visual C++ for Windows, version 1.0
    

In Microsoft C versions 6.0, 6.0a, 6.0ax, C/C++ version 7.0, and Visual C++ version 1.0 it is sometimes necessary to explicitly initialize or reinitialize the C run-time graphics library from an application program. The following are two situations where this procedure is necessary:

  • A user of the your application shells out and changes to another monitor (on a dual-monitor system). When the user returns to the application, you need to reinitialize the library to take into account the characteristics of the new monitor.
  • In the CDLLOBJS.LIB run-time model (that is, C run time in a DLL), GRTEXTP.OBJ doesn't get initialized and doesn't work properly. This is a known limitation, but it would be nice if you could make it work by explicitly initializing it at the beginning of your program.

In both of these cases, a call to the undocumented function _QCGINIT() resolves the problem because this initializes the graphics library.

_QCGINIT() is prototyped as follows:

   void _far _cdecl _QCGINIT(void);

Note: _QCGINIT() is an undocumented function that may or may not be included in subsequent releases of the graphics library. Please keep this in mind when writing code to take advantage of this function. Microsoft makes no claims and offers no promises regarding this function in the areas of performance, reliability, future availability, or customer support.

_QCGINIT() is __QCGINIT() in Visual C++ version 1.0 (2 underscores).


Additional reference words: kbinf 6.00 6.00a 6.00ax 7.00 1.00 qcginit
KBCategory: kbprg
KBSubcategory: CRTIss GraphicsIss
Keywords : kb16bitonly


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 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.