Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CDC::CreateDC
◄CDC►                                         ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  BOOL CreateDC( const char FAR* lpDriverName,
                 const char FAR* lpDeviceName, const char FAR* lpOutput,
                 LPSTR lpInitData );
 
  Parameter      Description
 
  <lpDriverName> Points to a null-terminated string that specifies the
                 MS-DOS filename (without extension) of the device driver
                 (for example, EPSON). You can also pass a CString object
                 for this parameter.
 
  <lpDeviceName> Points to a null-terminated string that specifies the
                 name of the specific device to be supported (for example,
                 EPSON FX-80). The <lpDeviceName> parameter is used if the
                 module supports more than one device. You can also pass a
                 CString object for this parameter.
 
  <lpOutput>     Points to a null-terminated string that specifies the
                 MS-DOS file or device name for the physical output medium
                 (file or output port). You can also pass a CString object
                 for this parameter.
 
  <lpInitData>   Points to a DEVMODE structure containing device-specific
                 initialization data for the device driver. The Windows
                 ExtDeviceMode function retrieves this structure filled in
                 for a given device. The <lpInitData> parameter must be
                 NULL if the device driver is to use the default
                 initialization (if any) specified by the user through the
                 Control Panel.
 
  Remarks
 
  Creates a device context for the specified device. The <lpDriverName>,
  <lpDeviceName>, and <lpOutput> parameters specify the device driver,
  device name, and physical output medium (file or port), respectively.
 
  The DRVINIT.H header file is required if the ◄DEVMODE► structure is
  used.
 
  Return Value
 
  TRUE if successful; otherwise FALSE.
 
  See Also
 
  ◄::ExtDeviceMode►, ◄::CreateDC►
 
 
                                     -♦-