AndyS19 Posted May 14, 2018 Share Posted May 14, 2018 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 More sharing options...
Earthshine Posted May 14, 2018 Share Posted May 14, 2018 Did you check the UDF that exists? Maybe they are listed in the source. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
jguinch Posted May 14, 2018 Share Posted May 14, 2018 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 ) Earthshine 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Earthshine Posted May 14, 2018 Share Posted May 14, 2018 (edited) Your search fu is awesome dude. Thanks for teaching me. 😃 Edited May 14, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
AndyS19 Posted May 15, 2018 Author Share Posted May 15, 2018 (edited) 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 May 22, 2018 by AndyS19 updated _DevCaps.au3 Earthshine 1 Link to comment Share on other sites More sharing options...
Earthshine Posted May 15, 2018 Share Posted May 15, 2018 You guys are too generous My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Bilgus Posted May 19, 2018 Share Posted May 19, 2018 ; 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 More sharing options...
AndyS19 Posted May 19, 2018 Author Share Posted May 19, 2018 (edited) 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 May 22, 2018 by AndyS19 Removed _DevCaps.au3 and updated the one in my original post. Link to comment Share on other sites More sharing options...
Earthshine Posted May 19, 2018 Share Posted May 19, 2018 You should be able to edit your post where you can delete that attachment and then reattach a new copy and save the edit My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
AndyS19 Posted May 22, 2018 Author Share Posted May 22, 2018 thanks, I did what you suggested. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now