All the members can be read, changed or set programmatically; however they should never be accessed directly, only through the designated functions. All these functions are declared in the devmode.h file and are implemented in the devmode.cpp file.
DEVMODE DM :
The Windows DEVMODE data structure.
Each bit of BliceMode represents a flag used by the printer driver. If the bit is set the value is TRUE, if it is not the value is FALSE. The flags and their values are as follows:
BLF_FAX200 0x00000002
BLF_INTERNETTIFF 0x00000004
BLF_PAGENUMBERING 0x00000008
BLF_REVERSEFILLORDER 0x00000010
BLF_MULTIIMAGE 0x00000020
BLF_WRITETEXT 0x00000040
BLF_UNICODETEXT 0x00000080
BLF_MAILMERGE 0x00000100
BLF_ADVANCEDTEXT 0x00000200 (obsolete)
BLF_DISABLEIMAGE 0x00000400
BLF_DISABLEGROUPFILE 0x00000800
BLF_LOWFAXCOMPATIBLE 0x00001000
BLF_SENDMESSAGE 0x00002000
BLF_ENABLETIFFDLL 0x00004000
BLF_ENABLEJPEGDLL 0x00008000
BLF_FAXOUTPUT 0x00010000
BLF_OVERWRITE 0x00020000
BLF_ROTATEPAPER 0x00040000
BLF_DELETEGROUPFILE 0x00080000
BLF_APPEND 0x00100000
BLF_ADVANCEDPAPERSIZE 0x00200000 (obsolete)
BLF_CUSTOMEXT 0x00400000
BLF_LOWFAXRES 0x00800000
BLF_FORCEPRINTERDPI 0x01000000
BLF_REDIRECT_PRINTING 0x02000000
BLF_MEMIMAGE 0x04000000
BLF_BATES 0x08000000
BLF_INVERTIMAGE 0x10000000
BLF_FLIPHORIZONTAL 0x20000000
BLF_FLIPVERTICAL 0x40000000
BLF_ENABLESAVEAS 0x80000000
Description of the flags:
BLF_FAX200 : Sets the 204x196 DPI Fine Fax Compatibity mode. Instead of setting this flag directly, use the following functions to set it or retrieve it:
DWORD GetFaxOutputMode (BlackIceDEVMODE* pDevMode);
BOOL SetFaxOutputMode(BlackIceDEVMODE* pDevMode, DWORD dwFaxOutputMode);
BLF_LOWFAXCOMPATIBLE : Sets the 204x98 DPI Standard Fax Compatibity mode. Instead of setting this flag directly, use the following functions to set it or retrieve it:
DWORD GetFaxOutputMode (BlackIceDEVMODE* pDevMode);
BOOL SetFaxOutputMode(BlackIceDEVMODE* pDevMode, DWORD dwFaxOutputMode);
BLF_INTERNETTIFF : The value of the ‘Internet TIFF format’ checkbox.
Access functions:
BOOL IsInternetTiffFormatEnabled(BlackIceDEVMODE* pDevMode);
void EnableInternetTiffFormat(BlackIceDEVMODE* pDevMode);
void DisableInternetTiffFormat(BlackIceDEVMODE* pDevMode);
BLF_PAGENUMBERING : The value of the ‘Add Page Numbering Tag’ checkbox.
Access functions:
BOOL IsPageNumberingEnabled(BlackIceDEVMODE* pDevMode);
void EnablePageNumbering(BlackIceDEVMODE* pDevMode);
void DisablePageNumbering(BlackIceDEVMODE* pDevMode);
BLF_REVERSEFILLORDER: The value of the ‘Reverse Bit Order in TIFF’ checkbox.
Access functions:
BOOL IsReverseBitOrderEnabled(BlackIceDEVMODE* pDevMode);
void EnableReverseBitOrder(BlackIceDEVMODE* pDevMode);
void DisableReverseBitOrder(BlackIceDEVMODE* pDevMode);
BLF_MULTIIMAGE:: The value of the ‘Create Multipage Image’ checkbox.
Access functions:
BOOL IsAppendImageEnabled(BlackIceDEVMODE* pDevMode);
void EnableAppendImage(BlackIceDEVMODE* pDevMode);
void DisableAppendImage(BlackIceDEVMODE* pDevMode);
BLF_WRITETEXT:: The value of the ‘WriteText File’ checkbox.
Access functions:
BOOL IsWriteTextEnabled(BlackIceDEVMODE* pDevMode);
void EnableWriteText(BlackIceDEVMODE* pDevMode);
void DisableWriteText(BlackIceDEVMODE* pDevMode);
BLF_UNICODETEXT:: Enables UNICODE (UTF-16 Little Endian) output for OCR feature of the printer driver. By default UNICODE OCR output is disabled.
Access functions:
BOOL IsUnicodeTextEnabled(BlackIceDEVMODE* pDevMode);
void EnableUnicodeText(BlackIceDEVMODE* pDevMode);
void DisableUnicodeText(BlackIceDEVMODE* pDevMode);
Before printer driver version 14.56, the BLF_UNICODETEXT flag also enabled Unicode output for the printer driver Text Extraction feature. Since version 14.56, the encoding of the Printer Driver Text output can be set or retrieved by the TextOutputEncoding field and the following functions:
DWORD GetTextOutputEncoding(BlackIceDEVMODE* pBlackIceDevMode)
BOOL SetTextOutputEncoding(BlackIceDEVMODE* pBlackIceDevMode, DWORD dwValue)
BLF_MAILMERGE:: The value of the ‘Mail Merge’ checkbox.
Access functions:
BOOL IsMailMergeEnabled(BlackIceDEVMODE* pDevMode);
void EnableMailMerge(BlackIceDEVMODE* pDevMode);
void DisableMailMerge(BlackIceDEVMODE* pDevMode);
BLF_ADVANCEDTEXT:: Not used since Printer Driver version 14.56. Since 14.56, TextOutputFormat field and the following functions can be used to change or retrieve the Text Output formatting:
DWORD GetTextOutputFormat(BlackIceDEVMODE* pBlackIceDevMode)
BOOL SetTextOutputFormat (BlackIceDEVMODE* pBlackIceDevMode, DWORD dwValue)
BLF_DISABLEIMAGE:: The value of the ‘Disable Image’ checkbox.
Access functions:
BOOL IsImageDisabled(BlackIceDEVMODE* pDevMode);
void EnableDisableImage(BlackIceDEVMODE* pDevMode);
void DisableDisableImage(BlackIceDEVMODE* pDevMode);
BLF_DISABLEGROUPFILE:: The value of the ‘Disable Group File’ checkbox.
Access functions:
BOOL IsGroupFileDisabled(BlackIceDEVMODE* pDevMode);
void DisableGroupFile(BlackIceDEVMODE* pDevMode);
void EnableGroupFile(BlackIceDEVMODE* pDevMode);
BLF_SENDMESSAGE: The value of the ‘Disable the Messaging Interface’ checkbox.
Access functions:
BOOL IsMessagingInterfaceEnabled(BlackIceDEVMODE* pDevMode);
void EnableMessagingInterface(BlackIceDEVMODE* pDevMode);
void DisableMessagingInterface(BlackIceDEVMODE* pDevMode);
BLF_ENABLETIFFDLL:: If set the using of the TIFF32.dll is enabled. Can be set only programmatically.
Access functions:
BOOL IsTiffDllEnabled(BlackIceDEVMODE* pDevMode);
BOOL EnableTiffDll(BlackIceDEVMODE* pDevMode);
BOOL DisableTiffDll(BlackIceDEVMODE* pDevMode);
BLF_FAXOUTPUT:: The value of the ‘Create Faxable Image’ checkbox
Access functions:
BOOL IsFaxOutputEnabled(BlackIceDEVMODE* pDevMode);
void EnableFaxOutput(BlackIceDEVMODE* pDevMode);
void DisableFaxOutput(BlackIceDEVMODE* pDevMode);
BLF_GLYPHSUPPORT:: The value of the ‘Eastern Character Support’ checkbox
Access functions:
BOOL IsEasternCharSupportEnabled(BlackIceDEVMODE* pDevMode);
void EnableEasternCharSupport(BlackIceDEVMODE* pDevMode);
void DisableEasternCharSupport(BlackIceDEVMODE* pDevMode);
BLF_ROTATEPAPER:: The value of the ‘Rotate Landscape image to Portrait’ checkbox
Access functions:
BOOL IsRotatePaperEnabled(BlackIceDEVMODE* pDevMode);
void EnableRotatePaper(BlackIceDEVMODE* pDevMode);
void DisableRotatePaper(BlackIceDEVMODE* pDevMode);
BLF_DELETEGROUPFILE:: The value of the ‘Delete Group File After Printing’ checkbox
Access functions:
BOOL IsDeleteGroupFileEnabled(BlackIceDEVMODE* pDevMode);
void EnableDeleteGroupFile(BlackIceDEVMODE* pDevMode);
void DisableDeleteGroupFile(BlackIceDEVMODE* pDevMode);
BLF_OWERWRITE: If this flag is set, the printer driver will overwrite existing files instead of renaming the new file. Instead of setting this flag directly, use the SetExistingFileAction function with the BLF_EXISTING_OVERWRITE value to set it, or use the GetExistingFileAction function to retrieve it:
DWORD GetExistingFileAction(BlackIceDEVMODE* pBlackIceDevMode);
BOOL SetExistingFileAction(BlackIceDEVMODE* pBlackIceDevMode, DWORD dwValue);
BLF_APPEND: If this flag is set, the printer driver will merge the existing file with the output file, appending the new pages to the end of the document, if the output format supports it. Instead of setting this flag directly, use the SetExistingFileAction function with the BLF_EXISTING_APPEND value to set it, or use the GetExistingFileAction function to retrieve it:
DWORD GetExistingFileAction(BlackIceDEVMODE* pBlackIceDevMode);
BOOL SetExistingFileAction(BlackIceDEVMODE* pBlackIceDevMode, DWORD dwValue);
BLF_KEEPFILES: Obsolete, see BLF_OVERWRITE and BLF_APPEND
BLF_ADVANCEDPAPERSIZE:: The value of the ‘Advanced Papersize’ checkbox. This flag is obsolete and not used from version 13.06.
Access functions:
BOOL IsAdvancedPaperSizeEnabled(BlackIceDEVMODE* pDevMode);
void EnableAdvancedPaperSize(BlackIceDEVMODE* pDevMode);
void DisableAdvancedPaperSize(BlackIceDEVMODE* pDevMode);
BLF_CUSTOMEXT:: The value of the ‘Use Custom Extension’ checkbox
Access functions:
BOOL IsCustomExtensionEnabled(BlackIceDEVMODE* pDevMode);
void EnableCustomExtension(BlackIceDEVMODE* pDevMode);
void DisableCustomExtension(BlackIceDEVMODE* pDevMode);
BLF_REDIRECT_PRINTING:: The flag that controls whether redirect printing is used
Access functions:
BOOL IsRedirectPrintingEnabled(BlackIceDEVMODE* pDevMode);
void EnableRedirectPrinting(BlackIceDEVMODE* pDevMode);
void DisableRedirectPrinting(BlackIceDEVMODE* pDevMode);
BLF_MEMIMAGE:: Create TIFF, DIB, EMF images, or PDF documents in memory. If this option is enabled, the driver will generate the output in the memory only, the driver will not write an output file. The handle to the image is passed to the application using the Messaging Interface. Please see the API for Messaging Interface page for the details:
BOOL IsGenerateImageInMemoryEnabled(BlackIceDEVMODE* pDevMode);
void EnableGenerateImageInMemory(BlackIceDEVMODE* pDevMode);
void DisableGenerateImageInMemory(BlackIceDEVMODE* pDevMode);
BLF_BATES:: Enable Bates Numbering:
BOOL IsBatesNumberingEnabled(BlackIceDEVMODE* pBlackIceDevMode);
BOOL EnableBatesNumbering(BlackIceDEVMODE* pBlackIceDevMode);
BOOL DisableBatesNumbering(BlackIceDEVMODE* pBlackIceDevMode);
BLF_INVERTIMAGE:: Print inverted image:
BOOL IsInvertImageEnabled(BlackIceDEVMODE* pBlackIceDevMode);
BOOL EnableInvertImage(BlackIceDEVMODE* pBlackIceDevMode);
BOOL DisableInvertImage(BlackIceDEVMODE* pBlackIceDevMode);
BLF_FLIPHORIZONTAL:: Print image horizontally flipped:
BOOL IsFlipHorizontalEnabled(BlackIceDEVMODE* pBlackIceDevMode);
BOOL EnableFlipHorizontal(BlackIceDEVMODE* pBlackIceDevMode);
BOOL DisableFlipHorizontal(BlackIceDEVMODE* pBlackIceDevMode);
BLF_FLIPVERTICAL:: Print image vertically flipped:
BOOL IsFlipVerticalEnabled(BlackIceDEVMODE* pBlackIceDevMode);
BOOL EnableFlipVertical(BlackIceDEVMODE* pBlackIceDevMode);
BOOL DisableFlipVertical(BlackIceDEVMODE* pBlackIceDevMode);
BLF_ENABLESAVEAS:: Enable “Save As Option”:
BOOL IsSaveAsOptionEnabled(BlackIceDEVMODE* pBlackIceDevMode);
BOOL EnableSaveAsOption(BlackIceDEVMODE* pBlackIceDevMode);
BOOL DisableSaveAsOption(BlackIceDEVMODE* pBlackIceDevMode);
Specifies the file format used by the driver. The available file formats are enumerated in the devmode.h
enum TEFileFormats{ FFR_BMP, // 0
FFR_PCX, // 1
FFR_DCX, // 2
FFR_TIFF_UNC, // 3
FFR_TIFF_G31D, // 4
FFR_TIFF_G31DNOEOL, // 5
FFR_TIFF_G32D, // 6
FFR_TIFF_G4, // 7
FFR_TIFF_PACK, // 8
FFR_TIFF_LZW, // 9
FFR_TIFF_JPEG, // 10
FFR_CALS, // 11
FFR_RAW_G31D, // 12
FFR_RAW_G31DNOEOL, // 13
FFR_RAW_G32D, // 14
FFR_RAW_G4, // 15
FFR_JPEG, // 16
FFR_JPEG_LAB, // 17
FFR_EMF, // 18
FFR_MMR, // 19
FFR_PDF, // 20
FFR_TIFF_DIALOGIC, // 21
FFR_TIFF_NMS, // 22
FFR_TIFF_GAMMALINK, // 23
FFR_PNG, // 24
FFR_GIF, // 25
FFR_HTML_GIF, // 26
FFR_HTML_PNG, // 27
FFR_HTML_JPEG, // 28
FFR_HTML_BMP, // 29
FFR_TIFF_CISCO, // 30
FFR_XML_GIF, // 31
FFR_XML_PNG, // 32
FFR_XML_JPEG, // 33
FFR_XML_BMP, // 34
FFR_XML_PDF, // 35
FFR_VECTOR_PDF, // 36
FFR_HTML, // 37
FFR_PDFA, // 38
FFR_XML, // 39
FFR_END
};
Access functions:
DWORD GetFileFormat(BlackIceDEVMODE* pDevMode);
void SetFileFormat(BlackIceDEVMODE* pDevMode, DWORD Format);
NOTE: In the Monochrome driver only the monochrome file formats are available, such as TIFF. The Metafile driver creates only Enhanced Metafile Format (EMF).
Specifies the color depth used by the printer. The values are enumerated in the devmode.h
enum ColorMode { BITS_1,
BITS_8GRAY,
BITS_8,
BITS_24,
BITS_END
};
Access functions:
DWORD GetColorDepth(BlackIceDEVMODE* pDevMode);
void SetColorDepth(BlackIceDEVMODE* pDevMode, DWORD ColorDepth);
NOTE: In the Monochrome driver only the BITS_1 ColorMode is available. The Metafile driver accepts only the BITS_24 value..
Specifies the height in pixels of the fax header.
Access functions:
DWORD GetFaxHeader(BlackIceDEVMODE* pDevMode);
void SetFaxHeader(BlackIceDEVMODE* pDevMode, DWORD nPixels);
Specifies the loss ratio of the jpeg image.
Access functions:
DWORD GetLossRatio(BlackIceDEVMODE* pDevMode);
void SetLossRatio(BlackIceDEVMODE* pDevMode, DWORD dwLossRatio);
Specifies the dithering method for the monochrome image. The available values are defined in the devmode.h
#define DITHER_NONE 0
#define DITHER_FS4 1
#define DITHER_JJN 2
#define DITHER_SMOOTH 3
#define DITHER_SHARP 4
#define DITHER_STUCKI 5
#define DITHER_THRESHOLD 6
Access functions:
DWORD GetDithering(BlackIceDEVMODE* pDevMode);
void SetDithering(BlackIceDEVMODE* pDevMode, DWORD dwDithering);
Specifies the brightness value.
Access functions:
DWORD GetBrightness(BlackIceDEVMODE* pDevMode);
void SetBrightness(BlackIceDEVMODE* pDevMode, DWORD dwBrightness);
Specifies the Paper Width value in pixels.
Access functions:
DWORD GetPageWidthInPixels(BlackIceDEVMODE* pDevMode);
void SetPaperWidthInPixel(BlackIceDEVMODE* pDevMode, DWORD nPixels);
Specifies the Paper Width value in pixels.
Access functions:
DWORD GetPageHeightInPixels(BlackIceDEVMODE* pDevMode);
void SetPaperHeightInPixel(BlackIceDEVMODE* pDevMode, DWORD nPixels);
TCHAR ApplicationPath[MAX_PATH]:
Specifies the name and the path of the application to be started after printing.
Access functions:
LPCTSTR GetApplicationPath(BlackIceDEVMODE* pDevMode);
void SetApplicationPath(BlackIceDEVMODE* pDevMode, LPCTSTR ApplicationPath);
Each bit of LaunchFlags represents a flag used by the printer driver. If the bit is set the value is TRUE, if it is not the value is FALSE. The flags and their values are the following:
BLF_LAUNCHAPP 0x00000001
BLF_STARTBEFOREPRINT 0x00000002
BLF_PASSPARAMETERS 0x00000004
BLF_STARTNORMAL 0x00000008
BLF_STARTMINIMIZED 0x00000010
BLF_STARTHIDDEN 0x00000020
BLF_DONOLAUNCHINUSERCONTEXT 0x00000040
BLF_STARTFORMESSAGING 0x00000080
BLF_READCUSTOMPARAMFROMREGISTRY 0x00000100
The “Start After Printing” option does not have an explicit flag, the application is started after printing, if neither the BLF_STARTBEFOREPRINT nor the BLF_STARTFORMESSAGING flag is set. E.g.:
To set Start after printing, use:
DisableStartBeforePrint(pDevMode);
DisableStartForMessaging(pDevMode);
To set Start before printing, use:
EnableStartBeforePrint(pDevMode);
DisableStartForMessaging(pDevMode);
To set Start for messaging, use:
DisableStartBeforePrint(pDevMode);
EnableStartForMessaging(pDevMode);
The BLF_READCUSTOMPARAMFROMREGISTRY flag is for internal use and is set automatically by the driver, do not change its value.
BLF_LAUNCHAPP: The value of the ‘Enable Start Application’ checkbox.
Access functions:
BOOL IsStartApplicationEnabled(BlackIceDEVMODE* pDevMode);
void EnableStartApplication(BlackIceDEVMODE* pDevMode);
void DisableStartApplication(BlackIceDEVMODE* pDevMode);
BLF_STARTBEFOREPRINT:: The value of the ‘Start Before Printing’ and ‘Start After Printing’ radio button. If TRUE the ‘Start Before Printing’radio button is selected, otherwise the ‘Start After Printing’ radio button is selected.
Access functions:
BOOL IsStartBeforePrint(BlackIceDEVMODE* pDevMode);
void EnableStartBeforePrint(BlackIceDEVMODE* pDevMode);
void DisableStartBeforePrint(BlackIceDEVMODE* pDevMode) ;
BLF_PASSPARAMETERS:: The value of the ‘Pass Parameters’ checkbox.
Access functions:
BOOL IsPassParametersEnabled(BlackIceDEVMODE* pDevMode);
void EnablePassParameters(BlackIceDEVMODE* pDevMode);
void DisablePassParameters(BlackIceDEVMODE* pDevMode) ;
BLF_STARTNORMAL:: The value of the ‘Normal’ radio button.
Access functions:
BOOL IsStartNormal(BlackIceDEVMODE* pDevMode);
void EnableStartNormal(BlackIceDEVMODE* pDevMode);
void DisableStartNormal(BlackIceDEVMODE* pDevMode) ;
BLF_STARTMINIMIZED:: The value of the ‘Minimized’ radio button.
Access functions:
BOOL IsStartMinimized(BlackIceDEVMODE* pDevMode);
void EnableStartMinimized(BlackIceDEVMODE* pDevMode);
void DisableStartMinimized(BlackIceDEVMODE* pDevMode) ;
BLF_STARTHIDDEN:: The value of the ‘Hidden’ radio button.
Access functions:
BOOL IsStartHidden(BlackIceDEVMODE* pDevMode);
void EnableStartHidden(BlackIceDEVMODE* pDevMode);
void DisableStartHidden(BlackIceDEVMODE* pDevMode) ;
BLF_ DONOLAUNCHINUSERCONTEXT:: Application starting in user context. This value can be set in the INI file. Pease see the Sharing the printer drivers section
BOOL IsLaunchInUserConextEnabled(BlackIceDEVMODE* pBlackIceDevMode);
BLF_STARTFORMESSAGING: If TRUE the ‘Start for Messaging’ radio button is selected, otherwise the ‘Start Before Printing’ or ‘Start After Printing’ radio button is selected depending on the state of the BLF_STARTBEFOREPRINT flag. If this flag is enabled, the application is started before printing and the printer driver waits for the application to start listening for messages. You can set how much the printer driver will wait using the “Messaging Timeout” INI file option.
Access functions:
BOOL IsStartForMessaging(BlackIceDEVMODE* pDevMode);
void EnableStartForMessaging(BlackIceDEVMODE* pDevMode);
void DisableStartForMessaging(BlackIceDEVMODE* pDevMode);
The FileNameGenerationFlags member represents the method used by the printer driver to generate the files. This setting is in the ‘Name generation Method’ combobox. The available values are defined in the devmode.h and must be one of the following:
enum { FILENAME_PREFIX_DEVMODE,
FILENAME_PREFIX_REGISTRY,
FILENAME_PREFIX_INI,
FILENAME_EXACT_DEVMODE,
FILENAME_EXACT_REGISTRY,
FILENAME_EXACT_INI,
FILENAME_DOCUMENT_NAME,
FILENAME_CUSTOM,
FILENAME_LAST
};
Access functions:
DWORD GetFileGenerationMethod(BlackIceDEVMODE* pDevMode);
void SetFileGenerationMethod(BlackIceDEVMODE* pDevMode,
DWORD dwGenMethod);
TCHAR OutputDirectory[MAX_PATH]:
The OutputDirectory member stores the path where the printer driver generates the files.
Access functions:
void DEVMODE_SetOutputDirectory(BlackIceDEVMODE* pDevMode, LPCTSTR OutputDir);
LPCTSTR DEVMODE_GetOutputDirectory(BlackIceDEVMODE* pDevMode);
TCHAR ImageFileName[MAX_PATH]:
The ImageFileName member stores the file name if the file generation method is “Exact Filename”.
Access functions:
LPCTSTR GetImageFileName(BlackIceDEVMODE* pDevMode);
void SetImageFileName(BlackIceDEVMODE* pDevMode, LPCTSTR ImageFileName);
TCHAR FileNamePrefix[MAX_PREFIX_LENGTH +1]:
The FileNamePrefix member stores the prefix of the generated file name if the file generation method is FILENAME_PREFIX_DEVMODE. The max length of the prefix is 3 characters, if it is longer, it will be truncated to the first 3 characters.
Access functions:
LPCTSTR GetFileNamePrefix(BlackIceDEVMODE* pDevMode);
void SetFileNamePrefix(BlackIceDEVMODE* pDevMode, LPCTSTR FileNamePrefix);
TCHAR FileExtension[MAX_FILE_EXTENSION_LENGTH +1]:
The FileExtension member stores the extension of the generated file name if the file generation method is FILENAME_PREFIX_DEVMODE. The max length of the extension is 3 characters, if it is longer, it will be truncated to the first 3 characters.
Access functions:
LPCTSTR GetFileExtension(BlackIceDEVMODE* pDevMode);
void SetFileExtension(BlackIceDEVMODE* pDevMode, LPCTSTR FileExtension);
TCHAR InterfaceName[MAX_PATH]:
The InterfaceName member stores the name of the messaging interface.
Each driver has an unique Messaging Interface Name. You can create your own Messaging Interface Name by changing the default Messaging Interface Name in the printer’s DEVMODE InterfaceName member. To do this use the following functions:
Access functions:
LPCTSTR GetInterfaceName(BlackIceDEVMODE* pDevMode);
void SetInterfaceName(BlackIceDEVMODE* pDevMode, LPCTSTR InterfaceName);
The INIFileName member stores the name of the INI file which contains the information depending on the filename generation information.
For FILENAME_PREFIX_INI, the content of the INI file should be like:
[Black Ice Color Printer]
File name prefix=ABC
File name extension=TIFF
Access functions:
LPCTSTR GetINIFileName(BlackIceDEVMODE* pDevMode);
Void SetINIFileName(BlackIceDEVMODE* pDevMode, LPCTSTR INIFileName);
The TIFFDLLName member stores the name and path of the TIFF32.dll. This DLL encodes the TIFF files. The file is needed for TIFF output.
Access functions:
LPCTSTR GetTIFFDLLName(BlackIceDEVMODE* pDevMode);
void SetTIFFDLLName (BlackIceDEVMODE* pDevMode, LPCTSTR TIFFDLLName);
The JPEGDLLName member stores the name and path of the JPEG32.DLL. This DLL encodes the Jpeg files. The file is needed for Jpeg output.
Access functions:
LPCTSTR GetJPEGDLLName(BlackIceDEVMODE* pDevMode);
void SetJPEGDLLName (BlackIceDEVMODE* pDevMode, LPCTSTR JPEGDLLName);
TCHAR ResourceDLLName[MAX_PATH]:
The resources of the driver, such as the driver property dialogs, are stored in a separate DLL file. The look of the property sheets of the printer driver can be modified by moving or hiding controls. Also, all the names of the paper formats, DPI setting and file name generation methods are stored in this DLL and can be changed as well.
The ResourceDLLName member stores the name and path of the driver resource DLL.
Access functions:
LPCTSTR GetResourceDLLName(BlackIceDEVMODE* pDevMode);
void SetResourceDLLName(BlackIceDEVMODE* pDevMode, LPCTSTR ResourceDLLName);
DWORD SessionID:
Reserved.
DWORD UserFlags::
Reserved for extra programming possibilities.
TCHAR szUser1[128]:
Reserved for extra programming possibilities.
TCHAR szUser2[128]:
Reserved for extra programming possibilities.
TCHAR szUser2[128] field:
Starting with version 13.50, by default, the szUser2 field contains the “Black Ice Software, LLC” string (DM_BLACKICE_SOFTWARE_LLC defined in devmode.h) to help identifying Black Ice printers. The printer driver does not use this field internally, so it can be overwritten if necessary.
TCHAR WatermarkFilePortrait[MAX_PATH]:
The WatermarkFilePortrait member stores the name and path of the image file used as watermark for portrait oriented pages..
Access functions:
LPCTSTR GetWatermarkImageFileforPortrait (BlackIceDEVMODE* pDevMode);
void SetWatermarkImageFileforPortrait (BlackIceDEVMODE* pDevMode , LPCTSTR szWatermarkFile);
TCHAR WatermarkFileLandscape[MAX_PATH]:
The WatermarkFileLandscape member stores the name and path of the image file used as watermark for portrait oriented pages..
Access functions:
LPCTSTR GetWatermarkImageFileforLandscape (BlackIceDEVMODE* pDevMode);
void SetWatermarkImageFileforLandscape (BlackIceDEVMODE* pDevMode , LPCTSTR szWatermarkFile);
Each bit of WatermarkFlags represents a flag used by the printer driver. If the bit is set the value is TRUE, if it is not the value is FALSE. The flags and their values are the following:
#define BLF_WATERMARK_ENABLE 0x00000001
#define BLF_WATERMARK_FIRST_PAGE_ONLY 0x00000002
#define BLF_WATERMARK_POSITION_PORTRAIT_STRETCH_TO_FIT 0x00000004
#define BLF_WATERMARK_POSITION_PORTRAIT_STRETCH_TO_WIDTH 0x00000008
#define BLF_WATERMARK_POSITION_PORTRAIT_CENTER 0x00000010
#define BLF_WATERMARK_POSITION_PORTRAIT_TILE 0x00000020
#define BLF_WATERMARK_POSITION_LANDSCAPE_STRETCH_TO_FIT 0x00000040
#define BLF_WATERMARK_POSITION_LANDSCAPE_STRETCH_TO_WIDTH 0x00000080
#define BLF_WATERMARK_POSITION_LANDSCAPE_CENTER 0x00000100
#define BLF_WATERMARK_POSITION_LANDSCAPE_TILE 0x00000200
#define BLF_BLF_WATERMARK_UNIQUE_FIRST_PAGE 0x00000400
#define BLF_FIRST_WATERMARK_POSITION_STRETCH_TO_FIT 0x00000001
#define BLF_FIRST_WATERMARK_POSITION_STRETCH_TO_WIDTH 0x00000002
#define BLF_FIRST_WATERMARK_POSITION_CENTER 0x00000004
#define BLF_FIRST_WATERMARK_POSITION_TILE 0x00000008
BLF_WATERMARK_ENABLE: The value of the ‘Print Watermark’ checkbox.
Access functions:
BOOL IsWatermarkEnabled(BlackIceDEVMODE* pDevMode);
void EnableWatermark(BlackIceDEVMODE* pDevMode);
void DisableWatermark(BlackIceDEVMODE* pDevMode);
BLF_WATERMARK_FIRST_PAGE_ONLY: The value of the ‘Add Watermark To the first page only’ checkbox.
Access functions:
BOOL IsWatermarkOnFirstPageOnlyEnabled(BlackIceDEVMODE* pDevMode);
void EnableWatermarkOnFirstPageOnly(BlackIceDEVMODE* pDevMode);
void DisableWatermarkOnFirstPageOnly(BlackIceDEVMODE* pDevMode);
BLF_WATERMARK_POSITION_PORTRAIT_STRETCH_TO_FIT: Sets the watermark to fit the page on portrait pages.
Access functions:
BOOL IsWatermarkStretchedToFitPortrait(BlackIceDEVMODE* pDevMode);
void EnableStretchWatermarkToFitPortrait(BlackIceDEVMODE* pDevMode);
void DisableStretchWatermarkToFitPortrait(BlackIceDEVMODE* pDevMode);
BLF_WATERMARK_POSITION_PORTRAIT_STRETCH_TO_WIDTH: Sets the watermark to be stretched to fit the width of the page on portrait pages.
Access functions:
BOOL IsWatermarkStretchedToWidthPortrait(BlackIceDEVMODE* pDevMode);
void EnableStretchWatermarkToWidthPortrait(BlackIceDEVMODE* pDevMode);
void DisableStretchWatermarkToWidthPortrait(BlackIceDEVMODE* pDevMode);
BLF_WATERMARK_POSITION_PORTRAIT_CENTER: Sets the watermark to be centered on the page on portrait pages.
Access functions:
BOOL IsWatermarkCenteredPortrait(BlackIceDEVMODE* pDevMode);
void EnableCenterWatermarkPortrait(BlackIceDEVMODE* pDevMode);
void DisableCenterWatermarkPortrait (BlackIceDEVMODE* pDevMode);
BLF_WATERMARK_POSITION_PORTRAIT_TILE: Sets the watermark to be tiled on the page on portrait pages.
Access functions:
BOOL IsWatermarkTiledPortrait(BlackIceDEVMODE* pDevMode);
void EnableTileWatermarkPortrait(BlackIceDEVMODE* pDevMode);
void DisableTileWatermarkPortrait (BlackIceDEVMODE* pDevMode);
BLF_WATERMARK_POSITION_LANDSCAPE_STRETCH_TO_FIT: Sets the watermark to fit the page on landscape pages.
Access functions:
BOOL IsWatermarkStretchedToFitLandscape(BlackIceDEVMODE* pDevMode);
void EnableStretchWatermarkToFitLandscape(BlackIceDEVMODE* pDevMode);
void DisableStretchWatermarkToFitLandscape(BlackIceDEVMODE* pDevMode);
BLF_WATERMARK_POSITION_LANDSCAPE_STRETCH_TO_WIDTH: Sets the watermark to be stretched to fit the width of the page on landscape pages.
Access functions:
BOOL IsWatermarkStretchedToWidthLandscape(BlackIceDEVMODE* pDevMode);
void EnableStretchWatermarkToWidthLandscape(BlackIceDEVMODE* pDevMode);
void DisableStretchWatermarkToWidthLandscape(BlackIceDEVMODE* pDevMode);
BLF_WATERMARK_POSITION_ LANDSCAPE_CENTER: Sets the watermark to be centered on the page on landscape pages.
Access functions:
BOOL IsWatermarkCenteredLandscape(BlackIceDEVMODE* pDevMode);
void EnableCenterWatermarkLandscape(BlackIceDEVMODE* pDevMode);
void DisableCenterWatermarkLandscape (BlackIceDEVMODE* pDevMode);
BLF_WATERMARK_POSITION_LANDSCAPE_TILE: Sets the watermark to be tiled on the page on landscape pages.
Access functions:
BOOL IsWatermarkTiledLandscape(BlackIceDEVMODE* pDevMode);
void EnableTileWatermarkLandscape(BlackIceDEVMODE* pDevMode);
void DisableTileWatermarkLandscape (BlackIceDEVMODE* pDevMode);
BLF_WATERMARK_UNIQUE_FIRST_PAGE: The value of the ‘Unique Watermark on the first page’s checkbox.
Access functions:
BOOL IsWatermarkUniqueFirstPageEnabled(BlackIceDEVMODE* pDevMode);
BOOL EnableWatermarkUniqueFirstPage(BlackIceDEVMODE* pDevMode);
BOOL DisableWatermarkUniqueFirstPage(BlackIceDEVMODE* pDevMode);
BLF_FIRST_WATERMARK_POSITION_STRETCH_TO_FIT:
Sets the position of the watermark image. This image will be the watermark on the first printed image, when the ‘Unique watermark on the first page’ option is enabled.
Access functions:
DWORD GetWatermarkFirstImagePosition (BlackIceDEVMODE* pDevMode, BOOL bPortrait);
BOOL SetWatermarkFirstImagePosition (BlackIceDEVMODE* pDevMode, DWORD dwPosition, BOOL bPortrait);
BLF_FIRST_WATERMARK_POSITION_STRETCH_TO_WIDTH:
Sets the position of the watermark image. This image will be the watermark on the first printed image, when the ‘Unique watermark on the first page’ option is enabled.
Access functions:
DWORD GetWatermarkFirstImagePosition (BlackIceDEVMODE* pDevMode, BOOL bPortrait);
BOOL SetWatermarkFirstImagePosition (BlackIceDEVMODE* pDevMode, DWORD dwPosition, BOOL bPortrait);
BLF_FIRST_WATERMARK_POSITION_CENTER:
Sets the position of the watermark image. This image will be the watermark on the first printed image, when the ‘Unique watermark on the first page’ option is enabled.
Access functions:
DWORD GetWatermarkFirstImagePosition (BlackIceDEVMODE* pDevMode, BOOL bPortrait);
BOOL SetWatermarkFirstImagePosition (BlackIceDEVMODE* pDevMode, DWORD dwPosition, BOOL bPortrait);
BLF_FIRST_WATERMARK_POSITION_TILE:
Sets the position of the watermark image. This image will be the watermark on the first printed image, when the ‘Unique watermark on the first page’ option is enabled.
Access functions:
DWORD GetWatermarkFirstImagePosition (BlackIceDEVMODE* pDevMode, BOOL bPortrait);
BOOL SetWatermarkFirstImagePosition (BlackIceDEVMODE* pDevMode, DWORD dwPosition, BOOL bPortrait);
The high word of this value specifies the brightness of the watermark for portrait images, the lower word sets the brightness for landscape images.
Access functions:
DWORD GetWatermarkBrightnessPortrait(BlackIceDEVMODE* pDevMode);
BOOL SetWatermarkBrightnessPortrait (BlackIceDEVMODE* pDevMode, DWORD nBrightness);
DWORD GetWatermarkBrightnessLandscape(BlackIceDEVMODE* pDevMode);
void SetWatermarkBrightnessLandscape(BlackIceDEVMODE* pDevMode, DWORD nBrightness);
TCHAR AnnotationText[MAX_ANNOTATION_TEXT_LENGTH]:
The AnnotationText member stores a user defined text that will appear in the annotation (if there is any) printed on the page.
Access functions:
LPCTSTR GetAnnotationText(BlackIceDEVMODE* pDevMode);
void SetAnnotationText(BlackIceDEVMODE* pDevMode , LPCTSTR szAnnotationText);
TCHAR AnnotationSeparator[MAX_ANNOTATION_SEPARATOR_LENGTH]:
The AnnotationSeparator member stores a user defined text that will appear in the annotation (if there is any) printed on the page separating the annotation text, the date and the time.
Access functions:
LPCTSTR GetAnnotationSeparator(BlackIceDEVMODE* pDevMode);
void SetAnnotationSeparator(BlackIceDEVMODE* pDevMode , LPCTSTR szAnnotationSeparator);
The AnnotationFont member stores the parameters of the font used to print the annotation to the page..
Access functions:
LOGFONT* GetAnnotationFont(BlackIceDEVMODE* pDevMode);
void SetAnnotationFont(BlackIceDEVMODE* pDevMode , LOGFONT* AnnotationFont);
Each bit of AnnotationFlags represents an annotation related flag used by the printer driver. If the bit is set the value is TRUE, if it is not the value is FALSE. The flags and their values are the following:
#define BLF_ANNOTATION_ENABLED 0x00000001
#define BLF_ANNOTATION_TEXT_ENABLED 0x00000002
#define BLF_ANNOTATION_DATE_ENABLED 0x00000004
#define BLF_ANNOTATION_DATE_FORMAT_MMDDYYYY 0x00000008
#define BLF_ANNOTATION_DATE_FORMAT_MDYY 0x00000010
#define BLF_ANNOTATION_DATE_FORMAT_DDMMYYYY 0x00000020
#define BLF_ANNOTATION_DATE_FORMAT_DDMONYYYY 0x00000040
#define BLF_ANNOTATION_DATE_FORMAT_YYYYMMDD 0x00000080
#define BLF_ANNOTATION_DATE_FORMAT_JULIAN 0x00000100
#define BLF_ANNOTATION_TIME_ENABLED 0x00000200
#define BLF_ANNOTATION_TIME_FORMAT_12HOUR 0x00000400
#define BLF_ANNOTATION_TIME_FORMAT_24HOUR 0x00000800
#define BLF_ANNOTATION_TIME_FORMAT_MINUTES 0x00001000
#define BLF_ANNOTATION_TIME_FORMAT_SECONDS 0x00002000
#define BLF_ANNOTATION_TIME_FORMAT_TIMEZONE 0x00004000
#define BLF_ANNOTATION_TRANSPARENT 0x00008000
#define BLF_ANNOTATION_OPAQUE 0x00010000
#define BLF_ANNOTATION_POSITION_TOP_LEFT 0x00020000
#define BLF_ANNOTATION_POSITION_TOP_RIGHT 0x00040000
#define BLF_ANNOTATION_POSITION_CENTER 0x00080000
#define BLF_ANNOTATION_POSITION_BOTTOM_LEFT 0x00100000
#define BLF_ANNOTATION_POSITION_BOTTOM_RIGHT 0x00200000
#define BLF_ANNOTATION_UNITS_MM 0x00400000
#define BLF_ANNOTATION_UNITS_INCH 0x00800000
#define BLF_ANNOTATION_UNITS_PIXELS 0x01000000
#define BLF_ANNOTATION_FIRSTPAGEONLY 0x02000000
BLF_ANNOTATION _ENABLED: Enables/disables annotation embedding.
Access functions:
BOOL IsAnnotationEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotation(BlackIceDEVMODE* pDevMode);
void DisableAnnotation(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_TEXT_ENABLED: Enables/disables the user defined text in the annotation.
Access functions:
BOOL IsAnnotationTextEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationText(BlackIceDEVMODE* pDevMode);
void DisableAnnotationText(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_DATE_ENABLED: Enables/disables the date in the annotation.
Access functions:
BOOL IsAnnotationDateEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationDate(BlackIceDEVMODE* pDevMode);
void DisableAnnotationDate(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_DATE_FORMAT_MMDDYYYY: Enables/disables the MM/DD/YYY date format in the annotation.
Access functions:
BOOL IsAnnotationDateFormatMMDDYYYYEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationDateFormatMMDDYYYY(BlackIceDEVMODE* pDevMode);
void DisableAnnotationDateFormatMMDDYYYY(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_DATE_FORMAT_MDYY: Enables/disables the M/D/YY date format in the annotation.
Access functions:
BOOL IsAnnotationDateFormatMDYYEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationDateFormatMDYY(BlackIceDEVMODE* pDevMode);
void DisableAnnotationDateFormatMDYY(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_DATE_FORMAT_DDMMYYYY: Enables/disables the DD/MM/YYYY date format in the annotation.
Access functions:
BOOL IsAnnotationDateFormatDDMMYYYYEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationDateFormatDDMMYYYY(BlackIceDEVMODE* pDevMode);
void DisableAnnotationDateFormatDDMMYYYY(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_DATE_FORMAT_DDMONYYYY: Enables/disables the DD/MON/YYYY date format in the annotation.
Access functions:
BOOL IsAnnotationDateFormatDDMONYYYYEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationDateFormatDDMONYYYY(BlackIceDEVMODE* pDevMode);
void DisableAnnotationDateFormatDDMONYYYY(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_DATE_FORMAT_YYYYMMDD: Enables/disables the YYYYMMDD date format in the annotation.
Access functions:
BOOL IsAnnotationDateFormatYYYYMMDDEnabled(BlackIceDEVMODE* pDevMode);
BOOL EnableAnnotationDateFormatYYYYMMDD(BlackIceDEVMODE* pDevMode);
void DisableAnnotationDateFormatYYYYMMDD(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_DATE_FORMAT_JULIAN: Enables/disables the Julian date format in the annotation.
Access functions:
BOOL IsAnnotationDateFormatJulianEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationDateFormatJulian(BlackIceDEVMODE* pDevMode);
void DisableAnnotationDateFormatJulian(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_TIME_ENABLED: Enables/disables the time in the annotation.
Access functions:
BOOL IsAnnotationTimeEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationTime(BlackIceDEVMODE* pDevMode);
void DisableAnnotationTime(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_TIME_FORMAT_12HOUR: Enables/disables the 12 hour time format in the annotation.
Access functions:
BOOL IsAnnotationTimeFormat12HourEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationTimeFormat12Hour(BlackIceDEVMODE* pDevMode);
void DisableAnnotationTimeFormat12Hour(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_TIME_FORMAT_24HOUR: Enables/disables the 24 hour time format in the annotation.
Access functions:
BOOL IsAnnotationTimeFormat24HourEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationTimeFormat24Hour(BlackIceDEVMODE* pDevMode);
void DisableAnnotationTimeFormat24Hour(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_TIME_FORMAT_MINUTES: Enables/disables the minutes in the annotation.
Access functions:
BOOL IsAnnotationMinutesEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationMinutes(BlackIceDEVMODE* pDevMode);
void DisableAnnotationMinutes(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_TIME_FORMAT_SECONDS: Enables/disables the minutes in the annotation.
Access functions:
BOOL IsAnnotationSecondsEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationSeconds(BlackIceDEVMODE* pDevMode);
void DisableAnnotationSeconds(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_TIME_FORMAT_TIMEZONE: Enables/disables the time zone in the annotation.
Access functions:
BOOL IsAnnotationTimeZoneEnabled(BlackIceDEVMODE* pDevMode);
void EnableAnnotationTimeZone(BlackIceDEVMODE* pDevMode);
void DisableAnnotationTimeZone(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_TRANSPARENT: Enables/disables the transparent annotation mode.
Access functions:
BOOL IsAnnotationTransparent(BlackIceDEVMODE* pDevMode);
void EnableTransparentAnnotation(BlackIceDEVMODE* pDevMode);
void DisableTransparentAnnotation(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_OPAQUE: Enables/disables the opaque annotation mode.
Access functions:
BOOL IsAnnotationOpaque(BlackIceDEVMODE* pDevMode);
void EnableOpaqueAnnotation(BlackIceDEVMODE* pDevMode);
void DisableOpaqueAnnotation(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_POSITION_TOP_LEFT: Sets the position of the annotation relative to the top left of the page.
Access functions:
BOOL IsAnnotationPostionTopLeft(BlackIceDEVMODE* pDevMode);
void EnableTopLeftAnnotationPostion(BlackIceDEVMODE* pDevMode);
void DisableTopLeftAnnotationPostion(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_POSITION_TOP_RIGHT: Sets the position of the annotation relative to the top right of the page.
Access functions:
BOOL IsAnnotationPostionTopRight(BlackIceDEVMODE* pDevMode);
void EnableTopRightAnnotationPostion(BlackIceDEVMODE* pDevMode);
void DisableTopRightAnnotationPostion(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_POSITION_CENTER: Sets the position of the annotation relative to the center of the page.
Access functions:
BOOL IsAnnotationPostionCenter(BlackIceDEVMODE* pDevMode);
void EnableCenterAnnotationPostion(BlackIceDEVMODE* pDevMode);
void DisableCenterAnnotationPostion(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_POSITION_BOTTOM_LEFT: Sets the position of the annotation relative to the bottom left of the page.
Access functions:
BOOL IsAnnotationPostionBottomLeft(BlackIceDEVMODE* pDevMode);
void EnableBottomLeftAnnotationPostion(BlackIceDEVMODE* pDevMode);
void DisableBottomLeftAnnotationPostion(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_POSITION_BOTTOM_RIGHT: Sets the position of the annotation relative to the bottom right of the page.
Access functions:
BOOL IsAnnotationPostionBottomRight(BlackIceDEVMODE* pDevMode);
void EnableBottomRightAnnotationPost ion(BlackIceDEVMODE* pDevMode);
void DisableBottomRightAnnotationPostion(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_UNITS_MM: Sets the units used to set the position of the annotation to tenths of a mm.
Access functions:
BOOL IsAnnotationUnitMM(BlackIceDEVMODE* pDevMode);
void EnableAnnotationUnitMM(BlackIceDEVMODE* pDevMode);
void DisableAnnotationUnitMM(BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_UNITS_INCH: Sets the units used to set the position of the annotation to hundredths of an inch.
Access functions:
BOOL IsAnnotationUnitInch(BlackIceDEVMODE* pDevMode);
void EnableAnnotationUnitInch (BlackIceDEVMODE* pDevMode);
void DisableAnnotationUnitInch (BlackIceDEVMODE* pDevMode);
BLF_ANNOTATION_UNITS_PIXELS: Sets the units used to set the position of the annotation to pixels.
Access functions:
BOOL IsAnnotationUnitPixels(BlackIceDEVMODE* pDevMode);
void EnableAnnotationUnitPixels(BlackIceDEVMODE* pDevMode);
void DisableAnnotationUnitPixels(BlackIceDEVMODE* pDevMode);
The AnnotationXOffset member stores the X coordinate of the annotation position. The annotation position relative to the origin of the annotation.
Access functions:
long GetAnnotationOffsetX(BlackIceDEVMODE* pDevMode);
void SetAnnotationOffsetX(BlackIceDEVMODE* pDevMode, long dXOffset);
The AnnotationYOffset member stores the Y coordinate of the annotation position. The annotation position relative to the origin of the annotation.
Access functions:
long GetAnnotationOffsetY(BlackIceDEVMODE* pDevMode);
void SetAnnotationOffsetY(BlackIceDEVMODE* pDevMode, long dYOffset);
Specifies how many degrees will the annotation text be rotated.
Access functions:
DWORD GetAnnotationRotation(BlackIceDEVMODE* pDevMode);
void SetAnnotationRotation(BlackIceDEVMODE* pDevMode, DWORD nRotationDegrees);
Specifies the color of the annotation text.
Access functions:
COLORREF GetAnnotationColor(BlackIceDEVMODE* pDevMode);
void SetAnnotationColor(BlackIceDEVMODE* pDevMode, COLORREF AnnotationColor);
DWORD dwPhysicalOffsetX:
The width of unprintable margin of the paper in pixels.
Access functions:
BOOL SetPagePhysicalOffsetX(DWORD PhysicalOffsetX, BlackIceDEVMODE* pBlackIceDevMode);
DWORD GetPagePhysicalOffsetX(BlackIceDEVMODE* pBlackIceDevMode);
DWORD dwPhysicalOffsetY:
The height of unprintable margin of the paper in pixels.
Access functions:
BOOL SetPagePhysicalOffsetY(DWORD PhysicalOffsetY, BlackIceDEVMODE* pBlackIceDevMode);
DWORD GetPagePhysicalOffsetY(BlackIceDEVMODE* pBlackIceDevMode);
Each bit of wPDFFlags represents a PDF related flag used by the printer driver. If the bit is set the value is TRUE, if it is not the value is FALSE. The flags and their values are the following:
#define BLF_PDF_FILTER_NOT_SPECIFIED 0x0010
#define BLF_PDF_FILTER_NO_COMPRESSION 0x0020
#define BLF_PDF_FILTER_FLATE_DECODE 0x0200
#define BLF_PDF_FILTER_RUNLENGTH_DECODE 0x0400
#define BLF_PDF_FILTER_CCITT_FAX_DECODE 0x0800
#define BLF_PDF_FILTER_DCT_JPEG_DECODE 0x1000
BLF_PDF_FILTER_NOT_SPECIFIED: Sets the PDF Filter to unspecified (default).
BLF_PDF_FILTER_NO_COMPRESSION: Sets the PDF Filter to no compression
Access functions:
BOOL IsPDFCompressionNoCompressionEnabled(BlackIceDEVMODE* pDevMode);
void EnablePDFCompressionNoCompression(BlackIceDEVMODE* pDevMode);
void DisablePDFCompressionNoCompression(BlackIceDEVMODE* pDevMode);
BLF_PDF_FILTER_FLATE_DECODE: Sets the PDF Filter to Flate decode
Access functions:
BOOL IsPDFCompressionFLATEnabled(BlackIceDEVMODE* pBlackIceDevMode);
BOOL EnablePDFFLATCompression(BlackIceDEVMODE* pBlackIceDevMode);
BOOL DisablePDFFLATCompression(BlackIceDEVMODE* pBlackIceDevMode);
BLF_PDF_FILTER_RUNLENGTH_DECODE: Sets the PDF Filter to Runlength decode.
Access functions:
BOOL IsPDFCompressionRUNLENGTHEnabled(BlackIceDEVMODE* pDevMode);
void EnablePDFRUNLENGTHCompression(BlackIceDEVMODE* pDevMode);
void DisablePDFRUNLENGTHCompression(BlackIceDEVMODE* pDevMode);
BLF_PDF_FILTER_CCIT_FAX_DECODE: Sets the PDF Filter to CCIT Fax decode
Access functions:
BOOL IsPDFCompressionCCITT_FAXEnabled(BlackIceDEVMODE* pDevMode);
void EnablePDFCompressionCCITT_FAX(BlackIceDEVMODE* pDevMode);
void DisablePDFCompressionCCITT_FAX(BlackIceDEVMODE* pDevMode);
BLF_PDF_FILTER_DCT_JPEG_DECODE: Sets the PDF Filter to JPEG decode
Access functions:
BOOL IsPDFCompressionJPEGEnabled(BlackIceDEVMODE* pDevMode);
void EnablePDFCompressionJPEG(BlackIceDEVMODE* pDevMode);
void DisablePDFCompressionJPEG(BlackIceDEVMODE* pDevMode);
The following functions set and return the wPDFFlags
WORD GetPDFCompressionFlags(BlackIceDEVMODE* pDevMode);
Void SetPDFCompressionFlags(BlackIceDEVMODE* pDevMode, WORD wPdfFlags);
APPLICATION_PARAMETER_POSITION_ARRAY aParameterOrderList;
This member is an array of unsigned shorts. It contains the list of the parameters to be passed to the application that is started by the printer driver. The parameters are passed as specified in the array from 0 to MAX_APPLICATION_PARAMETERS (defined in the “devmode.h” file).
Each parameter has an ID and the parameter’s ID is stored in the array:
typedef enum {
PARAMETER_NONE,
PARAMETER_DOCUMENT_NAME,
PARAMETER_GROUP_FILE_NAME,
PARAMETER_PRINTER_NAME,
PARAMETER_NUMBER_OF_PAGES,
PARAMETER_MULTIPAGE,
PARAMETER_ORIENTATION,
PARAMETER_CUSTOM,
PARAMETER_OUTPUT_FILENAME,
PARAMETER_LAST
} PARAMETER_VALUES;
I.E the default parameter list is 12345680 which mean that the parameters will be passed in the following order:
PARAMETER_DOCUMENT_NAME,
PARAMETER_GROUP_FILE_NAME,
PARAMETER_PRINTER_NAME,
PARAMETER_NUMBER_OF_PAGES,
PARAMETER_MULTIPAGE,
PARAMETER_ORIENTATION
PARAMETER_OUTPUT_FILENAME
To pass only the group file name and the page orientation, the array should look like: 26000000
Note, that zero value mean that no parameter is passed. A zero value cannot precede a valid value, i.e. 20600000 is invalid and will be reset to the default (12345680) by the printer driver.
unsigned char nBatesFormat:
The bates numbering format used. The formats can be defined in the printer driver’s INI file, or in the Printing Preferences
Access functions:
unsigned char GetBatesFormat(BlackIceDEVMODE* pBlackIceDevMode);
BOOL SetBatesFormat(BlackIceDEVMODE* pBlackIceDevMode, unsigned char nBatesFormat);
TCHAR CustomStartApplicationParameter [CUSTOM_START_APPLICATION_PARAMETER_LENGTH]:
Custom parameter passed to the started application. Only used for strings up to 63 characters (64 with ending \0 character), longer values are stored in the registry, therefore always use the access functions for setting or retrieving this value. For more information, please see the description of the access functions.
Access functions:
BOOL GetCustomStartApplicationParameter(BlackIceDEVMODE* pDevMode, LPTSTR pValue, DWORD* pSize);
BOOL SetCustomStartApplicationParameter(BlackIceDEVMODE* pBlackIceDevMode, LPCTSTR szCustomStartApplicationParameter);
BYTE ExtraBuffer[8]:
This member is not used. It is reserved for future developments.
BYTE TextOutputFormat:
Specifies the formatting of the Text Output. Possible values are the values of the TEXTOUTPUT_FORMAT enum:
TEXTOUTPUT_FORMAT_PLAIN = 0, // Plain Text (default)
TEXTOUTPUT_FORMAT_POSITION_AND_STYLE = 1, // Add font information, position and style
TEXTOUTPUT_FORMAT_LAYOUT = 2 // Text with layout
Access functions:
DWORD GetTextOutputFormat(BlackIceDEVMODE* pBlackIceDevMode)
BOOL SetTextOutputFormat (BlackIceDEVMODE* pBlackIceDevMode, DWORD dwValue)
BYTE TextOutputEncoding:
Specifies the encoding of the Text Output. Possible values are the values of the TEXTOUTPUT_CHARSET enum:
TEXTOUTPUT_CHARSET_ANSI = 0, // Default ANSI codepage (default)
TEXTOUTPUT_CHARSET_UTF8 = 1, // Unicode, UTF-8
TEXTOUTPUT_CHARSET_UTF16LE = 2, // Unicode, UTF-16 Little Endian
TEXTOUTPUT_CHARSET_UTF16BE = 3 // Unicode, UTF-16 Big Endian
Access functions:
DWORD GetTextOutputEncoding(BlackIceDEVMODE* pBlackIceDevMode)
BOOL SetTextOutputEncoding(BlackIceDEVMODE* pBlackIceDevMode, DWORD dwValue)