Hi All,

It's my understanding that if I use the ExtEscape function with the
CONTRASTCOMMAND escape code, that the call should eventually wind up
in my GPE derrived display class. I know my ContrastControl function
is being called during the initialization, but the ExtEscape call from
my application always returns 0 (indicating failure) and my
ContrastControl function is never called.

Is there something else I need to do in my display driver to "enable"
the interface through the ExtEscape function?

Following is a the code I'm using for the call:

HDC hdc = GetDC(NULL);
struct ContrastCmdInputParm CCmd;
CCmd.command = CONTRAST_CMD_SET;
CCmd.parm = 0;
int ExtRes = ExtEscape(hdc, CONTRASTCOMMAND, sizeof(CCmd), (const char
*)&CCmd, 0, NULL);



Thanks in advance,
Chris

Re: ExtEscape fails to call my ContrastControl function. by Steve

Steve
Mon Feb 09 17:37:54 CST 2004

Well, in theory that's what it should do. Unfortunately, the Contrast
Control virtual is actually only tied to the undocumented DrvContrastControl
function. if you want it connected to ExtEscape you need to add that
yourself in the DrvEscape handler.

DrvContrastControl is used if you have a keyboard in the system to allow
keyboard changes to the contrast GWES will read the last contrast setting
from the registry and "restore" it at boot. Unfortunately the gwes settings
for defining the contrast virtual key codes don't function anymore so the
whole thing is pretty shaky. If you have a keyboard you'll want to set the
registry upon any changes from within the Display driver to be sure GWES
will restore the value correctly. (The other thing you can do is set the
registry to a known bogus contrast level (say, 0xFFFFFFF) and then just
ignore that value in the driver.)

Hopefully this will get resolved in the next OS rev. It's been a point of
confusion a few too many times.

--
Steve Maillet (eMVP)
Entelechy Consulting
smaillet_AT_EntelechyConsulting_DOT_com