How to show a dialog in other desktop?
-
Dear Friends I have created a dialog based MFC application. Here I have one form say "MyForm", showing on my current desktop when I run my application. I have two button on this form called "NewDesktop" and "OldDesktop". Now when I press "NewDesktop" I use CreateDesktop() functions and then SwitchDesktop() so It creates new desktop and shows the new desktop. But now it hides my previous application and my form. Now I want to show my form(MyForm) in this new desktop. I don't know how to do that? Any help please? With many many thankx and regards in advance Mahesh
-
Dear Friends I have created a dialog based MFC application. Here I have one form say "MyForm", showing on my current desktop when I run my application. I have two button on this form called "NewDesktop" and "OldDesktop". Now when I press "NewDesktop" I use CreateDesktop() functions and then SwitchDesktop() so It creates new desktop and shows the new desktop. But now it hides my previous application and my form. Now I want to show my form(MyForm) in this new desktop. I don't know how to do that? Any help please? With many many thankx and regards in advance Mahesh
Have you tried "SetThreadDesktop" and then create the UI? 8bc7c0ec02c0e404c0cc0680f7018827ebee
-
Have you tried "SetThreadDesktop" and then create the UI? 8bc7c0ec02c0e404c0cc0680f7018827ebee
-
Hi... I have tried that but it return's false value. Whats seems to be the reason? Mahesh
"Remarks The SetThreadDesktop function will fail if the calling thread has any windows or hooks on its current desktop (unless the hDesktop parameter is a handle to the current desktop)." You must do this FIRST, then create your window. I don't think there is a way to move an already created window between desktops as it's managed by the WM for that particular desktop. 8bc7c0ec02c0e404c0cc0680f7018827ebee