Partager via


Sample DrvEscape Function (Windows CE 5.0)

Send Feedback

The following code example shows how a simple DrvEscape function could be implemented.

This example supports the QUERYESCSUPPORT and CONTRASTCOMMAND escape codes. For more information on display driver escape codes see Display Driver Escape Codes.

ULONG SampleDisp::DriverEscape(SURFOBJ *pso, ULONG iEsc, ULONG cjIn, PVOID pvIn, ULONG cjOut, PVOID pvOut) {
    int RetVal = 0; // default return value: "not supported"
    switch (iEsc) {
        case QUERYESCSUPPORT :
            if (CONTRASTCOMMAND == *(DWORD *)pvIn) {
                RetVal = 1;
            }
            break;
        case CONTRASTCOMMAND :
            HandleContrastCmd(cjIn, pvIn, cjOut, pvOut);
            break;
    }
    return RetVal;
}

See Also

FLAT Sample Display Driver | ATI Sample Display Driver | ATI Sample Display Driver Optimization | Sample Blit Acceleration | Display Driver Performance Profiling | Display Driver Registry Settings | Display Driver Development Concepts | Display Driver Extensions | Display Driver Recommendations

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.