Sign in to follow this  
ripspinner

Program No Console Window?

Recommended Posts

I believe I saw a command for it at one point, but sadly I dont know what it is.

Do you want it listed in the task bar? or that little spot next to the clock ? or only in the task manager?

Sorry I can't help you further, but if you answer those questions maybe someone will be able to help you more.

Share this post


Link to post
Share on other sites
Quote:

Do I need to resort to windows programming and not show the window?


Yes, you'll need to create a "Win32" project instead of a console project (this will set up the appropriate project options to omit the automatic linking with the CRT boot code that sets up the console window, and a couple other things; you can change this in an existing project if you know what to look for).

Then just don't create a window.

Share this post


Link to post
Share on other sites
** hack alert

Interestingly this was on windows support page to find a console window. To me its not a good idea to do but would work for existing console apps.

http://support.microsoft.com/kb/Q124103/

Then when you have the hwnd id, call ShowWindow( hwnd, SW_HIDE);

Share this post


Link to post
Share on other sites
Im not hacking I just want to create an application that runs in the background and when I press ctrl~ it runs the system cmd.exe file to bring up a console.
This was done on an appaday and I thought I'd like to try to do it in C++ sounds simple right, not really.
thnks

Share this post


Link to post
Share on other sites
Oh, then actually that code wouldn't be too too bad of a hack.

You could set up the app to hide initially, intercept windows calls in the background for key events, then show the console again.

The reason I say its a hack is that the code does a change of the console title window and then does a search for that specific window title, but given that it changes the name to something "unique", it provides a simple way to do it.

Share this post


Link to post
Share on other sites
Like I said, make a Windows app, but just don't create a window.

Now, it's going to be trickier to install the hooks you need to intercept keypresses regardless of whether or not the app has focus. You'll have to search around on the MSDN for the information.

(iminyourbrain mean "hack" in the sense that his suggestion, while it would probably work, is very inelegant and not guaranteed to work consistently, often, or at all).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this