Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Showing a window on different desktop

$
0
0

I have 2 questions.

I have an application which shows a full screen window in a different desktop. The issue is when the desktop is switched to show the dialog, the new desktop background is visible for a moment and then only the full screen window is showing.

Question 1:

My code is similar to below code snippet. Is this correct way to switch desktop?

if( !::SetThreadDesktop(hNewDesk))
 {
    LogError( "SetThreadDesktop() failed" );
	return;
 }
 if (!::SwitchDesktop(hNewDesk))
  {
    LogError( "SwitchDesktop() failed" );
    return;
 }

Question 2:

I know how to start an application in a different desktop using CreateProcess() without switching to that Desktop.I wanted to create a Window in another desktop without switching to that desktop.For example Desktop 1 and Desktop 2. I wanted to create full screen window in Desktop 2 from Desktop 1 without switching to Desktop 2 so that the window is already visible in Desktop 2 when SwitchDesktop() is called. Could anyone help me in this?





Thanks, Renjith V R


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>