Bugs item #2937703, was opened at 2010-01-23 00:45
Message generated for change (Comment added) made by ir0nh34d
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=2937703&group_id=2435
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: OS Version Issue
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Jim Michaels (jmichae3)
Assigned to: Nobody/Anonymous (nobody)
Summary: error: `SetConsoleDisplayMode' was not declared in this scop
Initial Comment:
http://msdn.microsoft.com/en-us/library/ms686028%28VS.85%29.aspx
I get the following kinds of errors with wincon.h functions. didn't somebody do testing?
gotoxy.cpp:105: error: `CONSOLE_WINDOWED_MODE' was not declared in this scope
gotoxy.cpp:105: error: `SetConsoleDisplayMode' was not declared in this scope
#include <wincon.h>
#include <windows.h>
#include <winbase.h>
...
HANDLE h=GetStdHandle(STD_OUTPUT_HANDLE);
COORD cdimensions;
cdimensions.X=40;
cdimensions.Y=25;
SetConsoleDisplayMode(h,CONSOLE_WINDOWED_MODE,&cdimensions);
this can be caused by the fact that, if you look at the header itself, you may find that the function is only defined for certain versions of windows NT family operating systems.
I am looking at wincon.h. I am finding also that even with XP, in which this function should be defined I would hope, that with XP _WIN32_WINNT=0x0400, not 0x0501. (windows version number information shows XP to be 5.1) so what gives?
I thought Windows NT 4.0 was 0x0400 and windows 7 was 0x0601, according to the chart I have on my web site that I got from microsoft references:
http://jesusnjim.com/programming/GetVersionEx.html
----------------------------------------------------------------------
>Comment By: Chris Sutcliffe (ir0nh34d)
Date: 2010-01-23 08:42
Message:
It is up to the developer to define _WIN32_WINNT appropriately, the
compiler will not determine it for you.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=2937703&group_id=2435
|