CWnd::OnSysCommand doesn't catch SC_SCREENSAVE
Mats Haggren -- haggren@hem.passagen.se
Monday, March 17, 1997
Environment: NT 4.0, VC++ 4.2-flat
Hi All!
In my CMainFrame I want to catch the WS_SCREENSAVE message coming from the
system by picking it up in the OnSysCommand method. However, OnsysCommand
doesn't always catch WS_SCREENSAVE and I can't figure out when it works and
when it doesn't. Do I have to do something else in order to safely catch
WS_SCREENSAVE?
Regards
/Mats
---------------------------------------------------------------------
Mats Haggren phone: +46 (0)13 35 92 69
Intentia R&D AB fax : +46 (0)13 35 91 03
Ottargatan 3 /// home : +46 (0)13 27 46 60
582 78 Linkoeping, Sweden (o o) email: haggren@hem.passagen.se
--------------------------ooO-(_)-Ooo--------------------------------
Dan Kirby -- dkirby@accessone.com
Wednesday, March 19, 1997
I think you meant SC_SCREENSAVE.
Here are 2 possible things to look at:
As the online documentation states:
In WM_SYSCOMMAND messages, the four low-order bits of the uCmdType
parameter are used internally by Windows. To obtain the correct result when
testing the value of uCmdType, an application must combine the value 0xFFF0
with the uCmdType value by using the bitwise AND operator.
Also, I believe the message goes only to the active application.
--dan
----------
> From: Mats Haggren
> To: mfc-l@netcom.com
> Subject: CWnd::OnSysCommand doesn't catch SC_SCREENSAVE
> Date: Monday, March 17, 1997 8:44 AM
>
> Environment: NT 4.0, VC++ 4.2-flat
>
> Hi All!
>
> In my CMainFrame I want to catch the WS_SCREENSAVE message coming from
the
> system by picking it up in the OnSysCommand method. However, OnsysCommand
> doesn't always catch WS_SCREENSAVE and I can't figure out when it works
and
> when it doesn't. Do I have to do something else in order to safely catch
> WS_SCREENSAVE?
>
> Regards
>
> /Mats
>
>
> ---------------------------------------------------------------------
> Mats Haggren phone: +46 (0)13 35 92 69
> Intentia R&D AB fax : +46 (0)13 35 91 03
> Ottargatan 3 /// home : +46 (0)13 27 46 60
> 582 78 Linkoeping, Sweden (o o) email: haggren@hem.passagen.se
> --------------------------ooO-(_)-Ooo--------------------------------
>
Become an MFC-L member
| Вернуться в корень Архива
|