... suit our configuration, we can either create a printer device context using the CreateDC API call: Code: Select all HDC hDC = CreateDC( _T( "winspool" ), szPrinter, NULL, lpDevMode ); Or make this configuration as the default for this printer and for all applications using this printer. ...