I have a problem with windows screensaver.
My screensaver settings is On and timeout is 60 seconds.
I have created my own desktop using CreateDesktop() API of windows SDK. And switch the desktop to my own desktop.
here is the code.
DWORD dwThreadId = ::GetCurrentThreadId ( ) ;
HDESK m_hUserDesktop = 0;
HDESK m_hOrigDesktop = ::GetThreadDesktop ( dwThreadId ) ;
m_hUserDesktop = ::CreateDesktop ( _T("MyNewDesktop"),
0 ) ;
::SwitchDesktop ( m_hUserDesktop );
Sleep( 70000 );
::SwitchDesktop ( m_hOrigDesktop );
::CloseDesktop( m_hUserDesktop );
The problem is MyNewDesktop hides windows default screen saver in Windows7. It always displayed behind MyNewDesktop screen.
I can see the screensaver if I switch the desktop to the original one. That means screensaver appears after 60 seconds but not comes topmost.
Issue only in Windows7, It works fine in XP.
Can any one help?
Thanks in Advance, Shiju