c++ - Windows Message for User Locking Screen -


i'm working old-school windows programming in c++, , need capture event in wndproc indicates user has logged off or locked screen.

update (thanks david hefernan) i've searched everywhere, thing i've found wm_endsession message - not handle screen lock events.

anyone know how done? need apply windows 2000 through windows xp flavors.

the solution register wm_wtssession_change , respond in wndproc.

according documentation of wm_wtssession_change, minimum supported os xp. now, since windows 2000 no longer supported, documentation says xp minumum when in fact functionality available on earlier versions. in case, quick web search suggests may disappointed.

to notified session logoff (rather screen lock), should able use lparam value of wm_endsession message. presence of endsession_logoff flag.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -