Click here to Skip to main content
15,912,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was trying a code which includes the following function in Microsoft Visual C++ 6 ide

HWND hWnd;
hWnd=GetConsoleWindow();

but when I compile the program it shows an error saying " GetConsoleWindow " as an undeclared identifier ..

so is there any other function in alternate to this .. or if not, then from where I can get the definition.?
Posted

See the Remnarks section at http://msdn.microsoft.com/en-us/library/windows/desktop/ms683175(v=vs.85).aspx. Your Visual C++ version is too old. I would suggest you upgrade to a later version, such as http://www.visualstudio.com/en-us/downloads#d-2010-express[^].
 
Share this answer
 
Comments
[no name] 13-Dec-13 22:24pm    
Thank u .. It helped me !
GetConsoleWindow is defined in Windows.h, did you include this file at the top of your program?
 
Share this answer
 
Comments
[no name] 13-Dec-13 11:02am    
yes. infact I also included the file wincon.h , but still it gives the same error.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900