mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395
int main()
{
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
}
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
I saw the functionn GetConsoleWindow() in MSDN but I am unable to use it in both the compilers I have ( Dev C++ & Code::Blocks ) Please Help
You need to ... #define _WIN32_WINNT 0x0500 // ... or higher
mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395
Define _WIN32_WINNT before you #include <windows.h>
As to the reason why you need it, see Using Windows Headers
mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395
William Hemsworth
Posting Virtuoso
1,591 posts since Mar 2008
Reputation Points: 1,429
Solved Threads: 129
ehh, what the hell ? for some reason my post is before yours, even though i was answering yours :S
William Hemsworth
Posting Virtuoso
1,591 posts since Mar 2008
Reputation Points: 1,429
Solved Threads: 129
I use Dev, sleep should work as long as you have the #include and have a capital 'S' in Sleep(3000);
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439