Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


C++ gui making cmd line ont show

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Fri Aug 03, 2007 9:18 am    Post subject: C++ gui making cmd line ont show Reply with quote

when i compile and run a gui in code::blocks the cmd line always comes along with the app, how do i make that not so?
_________________
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Fri Aug 03, 2007 9:20 am    Post subject: Reply with quote

specify a GUI app instead of a console app
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Fri Aug 03, 2007 9:39 am    Post subject: Reply with quote

i tried that but i still get a cmd line Sad
_________________
Back to top
View user's profile Send private message
Nigtronix
Cheater
Reputation: 0

Joined: 18 May 2007
Posts: 45

PostPosted: Fri Aug 03, 2007 12:42 pm    Post subject: Reply with quote

That's fairly weird o.o

You can try a method not many people know about. I picked this up a while ago and used it in several of my projects.

In most compilers the header file for this API isn't defined correctly!

So place the following in stdafx.h
Code:

#define _WIN32_WINNT 0x0500 // Native API
//Function proto for GetConsoleWindow()
extern "C" WINBASEAPI HWND WINAPI GetConsoleWindow ();


Now you can use this in your main() function:

Code:


HWND hWnd = GetConsoleWindow();
ShowWindow( hWnd, SW_HIDE );


It's a pretty hackish way of forcing the cmd window to be invisible. (You can still send it commands though! Surprised)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites