|
我们想实现这样的效果:关闭屏幕显示(不是仅仅关背景灯),我用下面做法能够实现
- ...
- HDC gdc;
- int iESC=SETPOWERMANAGEMENT;
- gdc = ::GetDC(NULL);
- if (ExtEscape(gdc, QUERYESCSUPPORT, sizeof(int), (LPCSTR)&iESC, 0, NULL)==0)
- ;
- //::MessageBox(NULL,
- //L"Sorry, your Pocket PC does not support DisplayOff",
- //MB_OK);
- else
- {
- VIDEO_POWER_MANAGEMENT vpm;
- vpm.Length = sizeof(VIDEO_POWER_MANAGEMENT);
- vpm.DPMSVersion = 0x0001;
- // Power off the display
- int yes = 1;
- if (yes)
- {
- yes = 0 ;
- vpm.PowerState = VideoPowerOff;
- ExtEscape(gdc, SETPOWERMANAGEMENT, vpm.Length, (LPCSTR) &vpm,
- 0, NULL);
- }
- else
- {
- yes = 1;
- vpm.PowerState = VideoPowerOn;
- // Power on the display
- ExtEscape(gdc, SETPOWERMANAGEMENT, vpm.Length, (LPCSTR) &vpm,
- 0, NULL);
- }
- ::ReleaseDC(NULL, gdc);
- }
- ...
复制代码
但关了之后,程序是还在运行但屏幕不能打开了,只有重启。
我的问题是:是不是这样关了后屏幕就不响应点击操作了,我想实现关屏之后任然能响应点屏操作并开启屏幕显示应该怎么做。
谢谢!
|
|