[windev] opposite of SC_MONITORPOWER?

Drew drew.myers at esrd.com
Thu Jul 16 14:53:40 GMT 2009


According to the docs I saw LPARAM is -1 for power on for SC_MONITORPOWER.
But if you only get the message if your app is active then you probably will
need a global hook. Another option which may or may not work for you is the
IMSVidDevice interface described at:

msdn.microsoft.com/en-us/library/dd694519(VS.85).aspx

Drew

-----Original Message-----
From: windev-bounces at windev.org [mailto:windev-bounces at windev.org] On Behalf
Of Mark McGinty
Sent: Thursday, July 16, 2009 6:07 AM
To: windev at windev.org
Subject: [windev] opposite of SC_MONITORPOWER?

Greets,
 
I'm processing WM_SYSCOMMAND -> SC_MONITORPOWER to detect when the
monitor[s] get turned off due to inactivity -- no issues there.  But I also
want to know when the monitor[s] get turned back on again.  WM_SYSCOMMAND ->
SC_MONITORPOWER has no parameter value for this, it's 1 for going to low
power, 2 for going power off, and... that's it.
 
I sort-of expected WM_POWERBROADCAST to notify me of this, but it doesn't
seem to know anything about monitor power (only system power.)
 
I logged the message traffic after the screens kick on, I guess I can infer
from WM_ACTIVATE or something -- oh man!  I only get WM_SYSCOMMAND ->
SC_MONITORPOWER if my app is active when it happens?  That's lame!
 
So I suppose I need a global msg hook?  Or is there some other way to detect
this event?
 
 
TIA,
MM
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.windev.org/pipermail/windev/attachments/20090716/df45662e/attac
hment.htm
-- 
Windev mailing list at Windev at windev.org

Lost your password?  Need to unsubscribe or change your delivery options?  
Go to http://lists.windev.org/mailman/listinfo/windev
--
Search the Windev Archives - www.windev.org



More information about the Windev mailing list