win32 console & windowless
HI ,
I want to write a windows-32 bit console application (simple exe application).
but i don's want to see the BLACK DOS SCREEN in front of me.
remember i don't want to develop a NT-Service, it's going to be simple executable
without any windows, just i want to see it's execution only in task bar.
do u have any idea how to hide the dos window or do u know which book i have
to refer ( i had seen it once in a book, but i forgot in which book.) get back me
Regards,
BALAJI
Re: win32 console & windowless
Simple. Don't write a console app. Write a Windows app with no main window. The easiest way to do this is to write an Win32 API application (not MFC) with just an empty WinMain(). It's just like creating a console program, except that you are really writing a GUI app with no main window.
Regards,
Paul McKenzie
Re: win32 console & windowless
With all due respect, Paul, it's NOT that simple.
Yes, if all you want is to execute a piece of code (without a window), you're correct: Make it a WINDOWS application (that simply doesn't "show" a window).
HOWEVER, if you want to SCRIPT it (run it from a BATCH file, or interactively through the cmd window) - the INVOKING (cmd window) WAITS until the program invoked FINISHED (presumably so the %ERRORLEVEL% can be evaluated).
WINDOWS applications run as "independent" applications (they're not expected to "return" anything).
Yes, you CAN invoke them with a "START /WAIT MyApp.exe", which will FORCE the wait, the Windows Application DOESN'T behave the same way as a Console Application.
Re: win32 console & windowless
Not bad for a 12-year old thread!
Re: win32 console & windowless
Check his history. Looks like we'll hear from him again in another year resurrecting another zombie thread to post another 'with all due respect...' comment. See ya next year WardMD :wave:
Re: win32 console & windowless
@WardMD:
With all due respect, please do not resurrect (very) old threads!
[ Thread closed ]