00001
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _DEVMODE_H
00033 #define _DEVMODE_H
00034
00035 #include "LicenseInfo.h"
00036
00038
00040
00041
00042
00043
00045
00047
00049 typedef enum {LLTop = 0, LLBottom, LLUserDefined, LLNone, LLOther, LLLast} LicenseLocation;
00050
00054 struct LicenseLocationInfo
00055 {
00059 LicenseLocationInfo() : eFirstPage(LLNone), eOtherPages(LLOther) {ptFirstPage.x = ptFirstPage.y = ptOtherPages.x = ptOtherPages.y = 0;};
00060
00061
00063 LicenseLocation eFirstPage;
00065 POINT ptFirstPage;
00067 LicenseLocation eOtherPages;
00069 POINT ptOtherPages;
00070
00074 void Clear() {eFirstPage = LLNone; eOtherPages = LLOther; ptFirstPage.x = ptFirstPage.y = ptOtherPages.x = ptOtherPages.y = 0;};
00076 POINT LocationForPage(bool bFirstPage, SIZE szPageSize, SIZE szLicenseSize) const;
00077 };
00078
00082 typedef struct tagOEMDEV
00083 {
00085 OEM_DMEXTRAHEADER dmOEMExtra;
00087 WCHAR cFilename[MAX_PATH + 1];
00089 BOOL bAutoOpen;
00091 BOOL bSetProperties;
00093 LicenseLocationInfo location;
00095 LicenseInfo info;
00097 BOOL bAutoURLs;
00099 BOOL bCreateAsTemp;
00100
00101 } OEMDEV, *POEMDEV;
00102
00104 typedef const OEMDEV *PCOEMDEV;
00105
00106
00107
00109
00111
00113 HRESULT hrOEMDevMode(DWORD dwMode, POEMDMPARAM pOemDMParam);
00115 BOOL ConvertOEMDevmode(PCOEMDEV pOEMDevIn, POEMDEV pOEMDevOut, HANDLE hPrinter);
00117 BOOL MakeOEMDevmodeValid(POEMDEV pOEMDevmode);
00119 void Dump(PCOEMDEV pOEMDevIn);
00120
00122 void ReadOEMDevFromRegistry(POEMDEV pDev, HANDLE hPrinter);
00124 bool WriteOEMDevToRegistry(const POEMDEV pDev, HANDLE hPrinter);
00125
00126 #endif
00127
00128