Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DEVMODE structure
Message
From
09/07/2003 13:33:26
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, United States
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00808200
Message ID:
00808586
Views:
18
Anatoliy,
If I can ever get the stupid PayPal to work, I'll take a look. PayPal claims I have an account and won't let me create another.

Gary


>Hi Gary,
>
>I have several code samples (members area):
>
>Configuring DEVMODE structure for a printer
>http://www.news2news.com/vfp/?example=384&function=591
>This particular example operates with results obtained from DocumentProperties function.
>
>Opening a Page Setup dialog box to specify the attributes of a printed page
>http://www.news2news.com/vfp/?example=272
>
>How to change display settings: screen resolution, screen refresh rate
>http://www.news2news.com/vfp/?example=374
>
>* * *
>Here is the structure with offsets to each member
>
>*|typedef struct _devicemode {
>*|  BCHAR  dmDeviceName[CCHDEVICENAME];   0:32
>*|  WORD   dmSpecVersion;                32:2
>*|  WORD   dmDriverVersion;              34:2
>*|  WORD   dmSize;                       36:2
>*|  WORD   dmDriverExtra;                38:2
>*|  DWORD  dmFields;                     40:4
>*|  union {
>*|    struct {
>*|      short dmOrientation;             44:2
>*|      short dmPaperSize;               46:2
>*|      short dmPaperLength;             48:2
>*|      short dmPaperWidth;              50:2
>*|      short dmScale;                   52:2
>*|      short dmCopies;                  54:2
>*|      short dmDefaultSource;           56:2
>*|      short dmPrintQuality;            58:2
>*|    };
>*|    POINTL dmPosition;                 44:8
>*|    DWORD  dmDisplayOrientation;       44:4
>*|    DWORD  dmDisplayFixedOutput;       44:4
>*|  };
>*|  short  dmColor;                      60:2
>*|  short  dmDuplex;                     62:2
>*|  short  dmYResolution;                64:2
>*|  short  dmTTOption;                   66:2
>*|  short  dmCollate;                    68:2
>*|  BYTE  dmFormName[CCHFORMNAME];       70:32
>*|  WORD  dmLogPixels;                  102:2
>*|  DWORD  dmBitsPerPel;                104:4
>*|  DWORD  dmPelsWidth;                 108:4
>*|  DWORD  dmPelsHeight;                112:4
>*|  union {
>*|    DWORD  dmDisplayFlags;            116:4
>*|    DWORD  dmNup;                     116:4
>*|  }
>*|  DWORD  dmDisplayFrequency;          120:4
>*|#if(WINVER >= 0x0400)
>*|  DWORD  dmICMMethod;                 124:4
>*|  DWORD  dmICMIntent;                 128:4
>*|  DWORD  dmMediaType;                 132:4
>*|  DWORD  dmDitherType;                136:4
>*|  DWORD  dmReserved1;                 140:4
>*|  DWORD  dmReserved2;                 144:4
>*|#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
>*|  DWORD  dmPanningWidth;              148:4
>*|  DWORD  dmPanningHeight;             152:4
>*|#endif
>*|#endif /* WINVER >= 0x0400 */
>*|} DEVMODE;
>
>If DocumentProperties is declared in this way:
>
>DECLARE INTEGER DocumentProperties IN winspool.drv;
>	INTEGER hWnd, INTEGER hPrinter, STRING pDeviceName,;
>	STRING @pDevModeOutput, STRING @pDevModeInput, INTEGER fMode
>
>the modified device mode is returned in a string buffer. Knowing WORD and DWORD byte ordering it is possible to retrieve all parameters.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform