Set a member of the DEVMODE.
BOOL dSetParameter(HWND MainWnd, LPLONG lpLong, LPSTR lpStringTmp)
Input value: MainWnd - a window handle (can be NULL).
Input value lpLong - a pointer to a long value. Represents the member of the
DEVMODE to be changed. The valid values are defined in the ‘setup.h’ file
// Parameters to call dSetParameter()
#define PAR_INIC_PARAMETERS 0 // clear ALL parameters & set default values.
#define PAR_DRIVER_VERZIO 1 // numeric
#define PAR_DRIVER_NAME 2 // string
#define PAR_DRIVER_DRIVERFILE 3 // string
#define PAR_DRIVER_DATAFILE 4 // string
#define PAR_DRIVER_CONFIGFILE 5 // string
#define PAR_PRINTER_NAME 101 // string
#define PAR_PRINTER_PORT 102 // string
#define PAR_PRINTER_PROCESS 103 // string
#define PAR_PRINTER_DATATYPE 104 // string
// members of the Windows DEVMODE (BlackIceDEVMODE.DM)
#define PAR_DEVMODE_ORIENT 201 // numeric (VAL_LANDSCAPE or VAL_PORTRAIT)
#define PAR_DEVMODE_PAPERSIZE 202 // numeric (VAL_PAPER_xxx)
#define PAR_DEVMODE_PAPERLENGTH 203 // numeric
#define PAR_DEVMODE_PAPERWIDTH 204 // numeric
#define PAR_DEVMODE_DITHER 205 // numeric (VAL_DITHER_xx)
#define PAR_DEVMODE_XDPI 206 // numeric
#define PAR_DEVMODE_YDPI 207 // numeric
// members of the BlackIceDEVMODE
#define PAR_DEVMODE_FILEFORMAT 301 // numeric (VAL_xxx_INDX(_xxx))
#define PAR_DEVMODE_RENAMEDLGBOX 302 // VAL_YES or VAL_NO
#define PAR_DEVMODE_OUTDIR 303 // string
#define PAR_DEVMODE_FAXHEADER 304 // numeric
#define PAR_DEVMODE_APPENDIMAGE 305 // VAL_YES or VAL_NO
#define PAR_DEVMODE_STARTAPPLICATION 306 // VAL_YES or VAL_NO
#define PAR_DEVMODE_APPLICATIONPATH 307 // string
#define PAR_DEVMODE_SERVERKEY 308 // string
#define PAR_DEVMODE_PAGENUMBERING 309 // VAL_YES or VAL_NO
#define PAR_DEVMODE_WRITETEXT 310 // VAL_YES or VAL_NO
#define PAR_DEVMODE_ADVTEXT 311 // VAL_YES or VAL_NO
#define PAR_DEVMODE_REVERSEFILLORDER 312 // VAL_YES or VAL_NO
#define PAR_DEVMODE_CREATEFAXABLEIMAGE 313 // VAL_YES or VAL_NO
#define PAR_DEVMODE_FILENAMEGEN 314 // numeric
#define PAR_DEVMODE_GLYPHSUPPORT 315 // numeric
#define PAR_DEVMODE_DITHERING 316 // numeric
#define PAR_DEVMODE_BRIGHTNESS 317 // numeric
#define PAR_DEVMODE_COLORDEPTH 318 // numeric
#define PAR_DEVMODE_RESOURCEDLLNAME 319 // string
#define PAR_DEVMODE_APPLICATION_STARTBEFOREPRINT 320 // VAL_YES or VAL_NO
#define PAR_DEVMODE_PASSPARAMETERS 321 // VAL_YES or VAL_NO
#define PAR_DEVMODE_SHOWAPPLICATIONWINDOW 322 // numeric VAL_START_NORMAL
#define PAR_DEVMODE_DISABLE_MESSAGING_INTERFACE 323 // VAL_YES or VAL_NO
#define PAR_DEVMODE_EXTENSION 324 // string
#define PAR_DEVMODE_INTERFACENAME 325 // string
Input value: lpStringTmp - Represents the new value of the DEVMODE member
specified in the lpLong parameter
Return value - return FALSE if the value passed in the lpLong
parameter is not valid (code to set the specified DEVMODE member is not present in the dSetParameter() function) , otherwise TRUE.
NOTE: Check the Changing the printer setting during installation section of the manual for information on implementing your own code to set the DEVMODE members.
NOTE: This function is outdated, no longer recommended.