Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Can I show UI in Windows service in MFC? [modified]

Can I show UI in Windows service in MFC? [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
c++designquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sumit durg
    wrote on last edited by
    #1

    I am making a Windows service In MFC.I want to show a UI on it. Is it possible? How?

    modified on Wednesday, August 20, 2008 7:15 AM

    N J M 3 Replies Last reply
    0
    • S sumit durg

      I am making a Windows service In MFC.I want to show a UI on it. Is it possible? How?

      modified on Wednesday, August 20, 2008 7:15 AM

      N Offline
      N Offline
      Nibu babu thomas
      wrote on last edited by
      #2

      sumit.durg wrote:

      I am making a Windows service.I want to show a UI on it. Is it possible? How?

      While creating a service you need to specify the flag SERVICE_INTERACTIVE_PROCESS or Open services.msc and goto the logon tab and check "Allow service to interact with desktop" checkbox.

      Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

      1 Reply Last reply
      0
      • S sumit durg

        I am making a Windows service In MFC.I want to show a UI on it. Is it possible? How?

        modified on Wednesday, August 20, 2008 7:15 AM

        J Offline
        J Offline
        Jonathan Darka
        wrote on last edited by
        #3

        You really should avoid showing ANY user interface in a Windows Service, they typically run when no one is logged in so there is no-one at the PC to either see the UI or use it. Also, as a Service usually runs as a different user account to the currently logged on user they will not see the UI anyway, especially in Vista when they use a special desktop.


        Jonathan Wilkes Darka[Xanya.net] [My Code Project Articles]

        1 Reply Last reply
        0
        • S sumit durg

          I am making a Windows service In MFC.I want to show a UI on it. Is it possible? How?

          modified on Wednesday, August 20, 2008 7:15 AM

          M Offline
          M Offline
          Mike Dimmick
          wrote on last edited by
          #4

          Windows Vista and Windows Server 2008 no longer permit interactive UI on the user's desktop. More information[^].

          DoEvents: Generating unexpected recursion since 1991

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups