Re: [GD-Windows] WM_SYSCOMMAND documentation question
Brought to you by:
vexxed72
From: brian s. <pud...@po...> - 2003-06-09 15:54:33
|
My take would be: they're not actually handling the message (hence a non-zero return) and they don't want it to go to DefWindowProc (hence the immediate return). Where the 1 comes from, I have no idea. But if they returned 0, it would be read by the OS as "I've handled the message, you are now clear to turn off the monitor power/size the window" and they probably don't want to deal with those messages in a simple sample app. They'd rather just eat them up and ignore them. You, as a creator of a real application, probably *should* deal with those messages properly and return 0. --brian On Monday, June 9, 2003, at 08:22 AM, Daniel Vogel wrote: > The D3D sample applications return 1 in response to WM_SYSCOMMAND to > prevent > certain events from interfering with the app being fullscreen though I > can't > find any documention why 1 is returned. The MSDN docs state that 0 > should be > returned if the application handles WM_SYSCOMMAND so I'm wondering > where the > return value of 1 is documented. > > case WM_SYSCOMMAND: > // Prevent moving/sizing and power loss in fullscreen mode > switch( wParam ) > { > case SC_MOVE: > case SC_SIZE: > case SC_MAXIMIZE: > case SC_KEYMENU: > case SC_MONITORPOWER: > if( false == m_bWindowed ) > return 1; > break; > } > break; > > > Thanks, > > -- Daniel, Epic Games Inc. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The > best > thread debugger on the planet. Designed with thread debugging features > you've never dreamed of, try TotalView 6 free at www.etnus.com. > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > |