CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2002
    Posts
    56

    MS Windows, How to display to selected desktop ?

    Hi, dear all:

    In MS Windows, in my program (a service), I need to set display to another Desktop ( a service seems always show on Default desktop ),

    in Unix/Linux, there is a parameter DISPLAY ...., but how can I do it in MS windows ?


    Thanks !!

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: MS Windows, How to display to selected desktop ?

    As far as I know, you cannot just display a window on another desktop.
    You can however launch a new process on another desktop. See the http://msdn.microsoft.com/en-us/libr...px]STARTUPINFO parameter to CreateProcess. It allows you to specify the desktop.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  3. #3
    Join Date
    Mar 2002
    Posts
    56

    Re: MS Windows, How to display to selected desktop ?

    Quote Originally Posted by Marc G View Post
    As far as I know, you cannot just display a window on another desktop.
    You can however launch a new process on another desktop. See the http://msdn.microsoft.com/en-us/libr...px]STARTUPINFO parameter to CreateProcess. It allows you to specify the desktop.

    Thank you, Marc G.

    but page not found ....

    The MessageBox() seems can show on any desktop, if it has the type MB_SERVICE_NOTIFICATION set, but not sure if it makes a new process or not. so I think maybe there are ways to show on another desktop.

  4. #4
    Join Date
    Oct 2007
    Posts
    178

    Re: MS Windows, How to display to selected desktop ?

    Quote Originally Posted by jesvh View Post
    page not found....
    just a typo:
    http://msdn.microsoft.com/en-us/libr...31(VS.85).aspx

  5. #5
    Join Date
    Mar 2002
    Posts
    56

    Re: MS Windows, How to display to selected desktop ?

    Quote Originally Posted by LoKi_79 View Post

    Thanks for your help !

  6. #6
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: MS Windows, How to display to selected desktop ?

    Yes, sorry about the typo
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured