first commit
This commit is contained in:
121
Lab7/ntconsle.cpp
Normal file
121
Lab7/ntconsle.cpp
Normal file
@@ -0,0 +1,121 @@
|
||||
//## begin module.cm preserve=no
|
||||
|
||||
// %X% %Q% %Z% %W%
|
||||
|
||||
//## end module.cm
|
||||
|
||||
|
||||
|
||||
//## begin module.cp preserve=no
|
||||
|
||||
//## end module.cp
|
||||
|
||||
|
||||
|
||||
//## Module: NTConsole; Pseudo Package body
|
||||
|
||||
//## Subsystem: lab7
|
||||
|
||||
//## Source file: H:\kurs\avC++\lab7\NTConsle.cpp
|
||||
|
||||
|
||||
|
||||
//## begin module.additionalIncludes preserve=no
|
||||
|
||||
//## end module.additionalIncludes
|
||||
|
||||
|
||||
|
||||
//## begin module.includes preserve=yes
|
||||
|
||||
//## end module.includes
|
||||
|
||||
|
||||
|
||||
// NTConsole
|
||||
|
||||
#include "NTConsle.h"
|
||||
|
||||
//## begin module.additionalDeclarations preserve=yes
|
||||
|
||||
#include <iostream.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
//## end module.additionalDeclarations
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Class NTConsole
|
||||
|
||||
|
||||
|
||||
NTConsole::NTConsole()
|
||||
|
||||
//## begin NTConsole::NTConsole%.hasinit preserve=no
|
||||
|
||||
//## end NTConsole::NTConsole%.hasinit
|
||||
|
||||
//## begin NTConsole::NTConsole%.initialization preserve=yes
|
||||
|
||||
//## end NTConsole::NTConsole%.initialization
|
||||
|
||||
{
|
||||
|
||||
//## begin NTConsole::NTConsole%.body preserve=yes
|
||||
|
||||
//## end NTConsole::NTConsole%.body
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
NTConsole::~NTConsole()
|
||||
|
||||
{
|
||||
|
||||
//## begin NTConsole::~NTConsole%.body preserve=yes
|
||||
|
||||
//## end NTConsole::~NTConsole%.body
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//## Other Operations (implementation)
|
||||
|
||||
void NTConsole::drawWindow (int xpos, int ypos, int width, int height, char* name)
|
||||
|
||||
{
|
||||
|
||||
//## begin NTConsole::drawWindow%940929802.body preserve=yes
|
||||
|
||||
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
||||
COORD ul;
|
||||
|
||||
char buff[] = " ";
|
||||
|
||||
LPVOID param;
|
||||
|
||||
DWORD written=0;
|
||||
|
||||
|
||||
|
||||
ul.X = xpos;
|
||||
|
||||
ul.Y = ypos;
|
||||
|
||||
SetConsoleCursorPosition(h,ul);
|
||||
|
||||
SetConsoleTextAttribute(h,FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_INTENSITY|BACKGROUND_BLUE|BACKGROUND_INTENSITY);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user