Computer Science Canada hide the dos window |
Author: | Geminias [ Sun Nov 20, 2005 8:17 pm ] |
Post subject: | hide the dos window |
pls tell me there is an easy way to get rid of the dos window.. i mean i'm making a window with winAPI and this stupid dos window shows in the back round all the time. |
Author: | wtd [ Sun Nov 20, 2005 8:19 pm ] |
Post subject: | |
Are you using an IDE? |
Author: | Geminias [ Sun Nov 20, 2005 8:29 pm ] |
Post subject: | |
yeah dev c++ my fingers were getting sore from all the command line typing i had to do with mingw. dev c++ is a much more friendly way to go when you're constantly testing little programs. |
Author: | wtd [ Sun Nov 20, 2005 8:31 pm ] |
Post subject: | |
Here's an idea... find the executable Dev-C++ created, if you can, and double-click it. |
Author: | Geminias [ Sun Nov 20, 2005 8:37 pm ] |
Post subject: | |
did you misunderstand me or am i misunderstanding you? that is the question twirling through my brain. you've seen me post here often enough to know that i certainly know how to run a compiled program. so i hope that isn't what you thought i was asking. just because i am not an experienced programmer does not mean i am an idiot... but you already know that right? then why treat me like i was born yesterday? maybe you shouldn't help people if it annoys you? Now for the question: i use the windows.h preprocessor and winmain() instead of main.. i make my window and it shows up fine, but behind it there is a dos window, is there a way to remove it? i dont like it there, it looks unprofessional to me. |
Author: | wtd [ Sun Nov 20, 2005 9:02 pm ] |
Post subject: | |
My thinking was that the window was there because the executable was launched via the IDE, which was spawning that to show error output. |
Author: | Geminias [ Sun Nov 20, 2005 9:11 pm ] |
Post subject: | |
hmm, no after my post i checked it by running the .exe but i had no luck. the console window still appeared behind it. ![]() i will likely have to resort to CreateProcess() and make it run silent.. unless you know of a better way? |
Author: | wtd [ Sun Nov 20, 2005 9:16 pm ] |
Post subject: | |
Trying to find something, though it's not easy considering how convoluted Microsoft's documentation is. As for the IDE thing... I just like to rule out the simple stuff first. |
Author: | Geminias [ Sun Nov 20, 2005 9:18 pm ] |
Post subject: | |
yeah i always do a google and search around before i ask any questions here. I understand you're a linux man, but if you find anything let me know. |
Author: | wtd [ Sun Nov 20, 2005 9:20 pm ] |
Post subject: | |
Can I see your code? I'm seeing an "int nCmdShow" arg to WinMain that looks like it might relate to this issue. |
Author: | Geminias [ Sun Nov 20, 2005 9:28 pm ] |
Post subject: | |
I thought that also. It looks a lot like "show command" lol, which was the first thing i went after. heres a link which should dissuade you from that line of thought. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/showwindow.asp[/code] |
Author: | wtd [ Sun Nov 20, 2005 9:36 pm ] | ||
Post subject: | |||
What happens with this sample?
|
Author: | Geminias [ Sun Nov 20, 2005 10:17 pm ] |
Post subject: | |
linker error, and i can't do anything about that since i dont know how to make dll's and link them and stuff |
Author: | wtd [ Sun Nov 20, 2005 10:25 pm ] |
Post subject: | |
So, C# is a decent language. ![]() |
Author: | md [ Sun Nov 20, 2005 10:27 pm ] |
Post subject: | |
a linker error doesn't mean you need to make dlls, it just means you need to link against the right libraries. Unfortunately I don't know what they would be... but I know that they exist and that msdn should tell you what they are. |
Author: | Geminias [ Mon Nov 21, 2005 12:40 am ] |
Post subject: | |
yeah, i guess thats true cornflake. oh well, if anyone stumbles across how to make the program run without a dos window that would be helpful. |
Author: | Geminias [ Mon Nov 21, 2005 1:34 am ] | ||
Post subject: | |||
hey wtd.. i found a "tutorial" about making the dos window invisible. i can't make much sense of it though... i dont know if its either a really bad tutorial or if i'm just not advanced enough yet to put it to use. i can't get the source it provides to work either. <a href="http://www.codeproject.com/win32/runsilent.asp#xx229599xx">Vist it here</a> ps. no i did not try to run it exactly as it appears here.
|
Author: | [Gandalf] [ Mon Nov 21, 2005 1:40 am ] |
Post subject: | |
From my somewhat limited experience with Dev-C++, I am almost sure that there is a 'project' option that disables the command prompt showing up. Look around there. Or else, try selecting the 'WinApi' option, not "command prompt" when creating your project. |