Jump to content

Need all DeviceCaps parameter values


Recommended Posts

I'm working on a printer program and I want to see all of the values of all of the device capabilities, but I cannot find anywhere that lists these values.
For example, I see code like this:

    Local $vPageWidth   = _WinAPI_GetDeviceCaps($hPrintDc, 8)   ; Const HORZRES= 8
    Local $vPageHeight  = _WinAPI_GetDeviceCaps($hPrintDc, 10)  ; Const VERTRES = 10
    Local $vPaperWidth  = _WinAPI_GetDeviceCaps($hPrintDc, 110) ; Const PHYSICALWIDTH = 110
    Local $vPaperHeight = _WinAPI_GetDeviceCaps($hPrintDc, 111) ; Const PHYSICALHEIGHT = 111

When I look at the MSDN library page, I see a list of all capabilities, but they give only the names, not the actual values.  In AutoIT, it's preferable to have defined values, so there isn't much chance to get them wrong; however when supplying just numbers, there's more of a chance of errors.

Does anyone know where all of them are listed?

Link to comment
Share on other sites

No, I don't use this in my UDF.

For all values, open a search engine, and search for "define HORZRES" (for example).
By chance, you will have an link to C header (link this one : http://www.rensselaer.org/dept/cis/software/g77-mingw32/include/wingdi.h )

 

Link to comment
Share on other sites

I searched the internet and also used the data in jguinch's link, and I've come up with this include file for all of the device caps.  There are some that I could not find any values for.  I set them to '?', so if you know these values, please update my list.

 

_DevCaps.au3

Edited by AndyS19
updated _DevCaps.au3
Link to comment
Share on other sites

; RASTERCAPS;
Const $RC_NONE             = 0x0000
Const $RC_BITBLT           = 0x0001
Const $RC_BANDING          = 0x0002
Const $RC_SCALING          = 0x0004
Const $RC_BITMAP64         = 0x0008
Const $RC_GDI20_OUTPUT     = 0x0010
Const $RC_GDI20_STATE      = 0x0020
Const $RC_SAVEBITMAP       = 0x0040
Const $RC_DI_BITMAP        = 0x0080
Const $RC_PALETTE          = 0x0100
Const $RC_DIBTODEV         = 0x0200
Const $RC_BIGFONT          = 0x0400
Const $RC_STRETCHBLT       = 0x0800
Const $RC_FLOODFILL        = 0x1000
Const $RC_STRETCHDIB       = 0x2000
Const $RC_OP_DX_OUTPUT     = 0x4000
Const $RC_DEVBITS          = 0x8000

 

Link to comment
Share on other sites

Thanh you.  Here is the file with Bilgus's values.  I also have both hex and decimal values.  I don't know how to replace the _DevCaps.au3 at the start of this thread, so I'm attaching it here:

 

Edited by AndyS19
Removed _DevCaps.au3 and updated the one in my original post.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...