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. Hide my app w/o CreateProcess()??

Hide my app w/o CreateProcess()??

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
3 Posts 3 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.
  • L Offline
    L Offline
    lynchspawn
    wrote on last edited by
    #1

    I have a console app that I'd like to run without the console popping up - no matter who calls it. I know normally, the calling app would use certain flags to hide it when calling CreateProcess() but the ability may not always be there for our users. They are calling it from within another app with scripting capabilities so they are not actually writing a C++ project to call out app. There may be a way to do it from that software (Citect) but I can't be sure. Other than re-writing it as a Windows GUI app, is there anything else I can do to have it run without the console popping up?

    N 1 Reply Last reply
    0
    • L lynchspawn

      I have a console app that I'd like to run without the console popping up - no matter who calls it. I know normally, the calling app would use certain flags to hide it when calling CreateProcess() but the ability may not always be there for our users. They are calling it from within another app with scripting capabilities so they are not actually writing a C++ project to call out app. There may be a way to do it from that software (Citect) but I can't be sure. Other than re-writing it as a Windows GUI app, is there anything else I can do to have it run without the console popping up?

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      Even if you find the console window and hide it, there'll still be a momentary flicker that'd be visible to most users. Instead - you only need to change main to WinMain and change the SUBSYSTEM linker setting to WINDOWS. As long as you don't create and show any UI, a WinMain app will be pretty much hidden (visually).

      K 1 Reply Last reply
      0
      • N Nish Nishant

        Even if you find the console window and hide it, there'll still be a momentary flicker that'd be visible to most users. Instead - you only need to change main to WinMain and change the SUBSYSTEM linker setting to WINDOWS. As long as you don't create and show any UI, a WinMain app will be pretty much hidden (visually).

        K Offline
        K Offline
        koothkeeper
        wrote on last edited by
        #3

        Nishant is right. I had the same problem and finally figured it out. It now works great without any screen flicker!

        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