Show driver-related-drvescape and extescape

Source: Internet
Author: User

Drvescape is a direct access display driver interface/mechanism that is provided to the application, it resembles the IOCTLs mode of the stream interface, and the completion of the standard GDI does not perform some functions. Upper application Call ExtEscape () Send query, set control command to display (print) Drive. These command words are called escape code. The system has defined escape code as follows:

The Queryescsupport 8 query shows whether the driver supports escape code for user requests.

Getvframephysical 6144 Get the physical address of the video memory

Getvframelen 6145 Get the memory size

Dbgdriverstat 6146 Returns the status of the display driver

Setpowermanagement 6147 setting power management status, such as backlight brightness adjustment

Getpowermanagement 6148 querying current power management status

Contrastcommand 6149 Contrast setting

Drvesc_getgammavalue 6202 Gets the gamma value. The document says to replace it with Systemparameterinfo.

Drvesc_setgammavalue 6201 Sets the gamma value. Use SystemParametersInfo to drive

Drvesc_setscreenrotation 6301 Set the screen rotation, you can go to 90,180,270.

Drvesc_getscreenrotation 6302 the current rotation value.

Drvesc_savevideomem 6501 when suspended, if the registry Hklm/system/gwe/porepaint equals 3, the video memory content will be saved

Drvesc_restorevideomem 6502 Wake-up time, restore memory content

drvesc_queryvideomemused 6503 gets how much video memory is currently in use.

Reserved 6150 through 99,999 reserved for future use.

Before use should be used Queryscsupport to query whether to support the specified escape code, if return 1, indicating support, return 0, indicating not supported. A simple example:

1 HDC hdc;2 intEsccode =6301;3HDC =GetDC (hWnd);4 if(HDC, ExtEscape8,sizeof(Esccode), (LPSTR) &esccode,0,0)) 5 {6Esccode =1;7ExtEscape (HDC,6301,sizeof(Esccode), (LPSTR) &esccode,0,0);8 }9ReleaseDC (HWND, HDC);

Note: First query drvesc_setscreenrotation whether this command word is supported. Query by sending the command word queryescsupport, if return 1 indicates support. As in line 4th above. The 2nd parameter 8 is Queryescsupport ( If you want to use this macro, you need to add the corresponding header file, I am lazy to check, directly use.). Next, use 6301, which is the command to set the rotation. The 4th parameter is the angle of rotation. The general driver supports 0,1,2,4, representing dmdo_0,dmdo_90,dmdo_180,dmdo_270 respectively, representing the angle of each rotation. As in line 7th above. In addition, The above is a dynamic rotation. If you want to maintain a rotated scene for each boot, you need to modify the registry Hklm/system/gdi/rotate

Show driver-related-drvescape and extescape

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.