www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Confused

↑ ↓ ← "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
↑ ↓ 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
↑ ↓ → "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


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,


program exists with no error messages.  Am I using the correct format for
this command?

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