www.digitalmars.com         C & C++   DMDScript  

c++ - Confused

reply "John Dyson" <post gowelding.com> writes:
I am using this statement which I derived by trial and error, to change the
display colour: disp_setattr(0x0041 + 45040);

It works fine on my PC running Win 98 and also my lap top running ME, but
when this command is encountered when run on my PC at work, running NT4, the
program exists with no error messages.  Am I using the correct format for
this command?

Many Thanks
John
Feb 01 2003
parent reply Frank Albe <falbe mindspring.com> writes:
On Sat, 1 Feb 2003 09:38:42 -0000, "John Dyson" <post gowelding.com>
wrote:

I am using this statement which I derived by trial and error, to change the
display colour: disp_setattr(0x0041 + 45040);

It works fine on my PC running Win 98 and also my lap top running ME, but
when this command is encountered when run on my PC at work, running NT4, the
program exists with no error messages.  Am I using the correct format for
this command?

Many Thanks
John
The functions in "disp.h" probably only work in MS-DOS and MS-DOS based Win32 Operating Systems (Win95, Win98, Wini-ME) because they do things at the hardware level which isn't allowed by an NT class Win32 OS (WinNT, Win2000, WinXP). ../frank
Feb 01 2003
parent "Walter" <walter digitalmars.com> writes:
"Frank Albe" <falbe mindspring.com> wrote in message
news:hc2o3v03ot2oj4ibq66c1uhf05d9g8eket 4ax.com...
 On Sat, 1 Feb 2003 09:38:42 -0000, "John Dyson" <post gowelding.com>
 wrote:
I am using this statement which I derived by trial and error, to change
the
display colour: disp_setattr(0x0041 + 45040);
It works fine on my PC running Win 98 and also my lap top running ME, but
when this command is encountered when run on my PC at work, running NT4,
the
program exists with no error messages.  Am I using the correct format for
this command?
The functions in "disp.h" probably only work in MS-DOS and MS-DOS based Win32 Operating Systems (Win95, Win98, Wini-ME) because they do things at the hardware level which isn't allowed by an NT class Win32 OS (WinNT, Win2000, WinXP).
You could try recompiling the program as a native win32 app. The disp functions will work then.
Feb 01 2003