1 /* $Id: notevil.c,v 1.1 1999/05/15 07:23:34 ea Exp $
5 * --------------------------------------------------------------------
7 * This software is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this software; see the file COPYING.LIB. If
19 * not, write to the Free Software Foundation, Inc., 675 Mass Ave,
20 * Cambridge, MA 02139, USA.
22 * --------------------------------------------------------------------
23 * ReactOS Coders Console Parade
35 LPCTSTR app_name
= _TEXT("notevil");
48 WORD wLen
= lstrlen(lpString
);
50 if (0 == wLen
) return;
51 WriteConsoleOutputCharacter(
58 FillConsoleOutputAttribute(
84 (BACKGROUND_RED
| BACKGROUND_GREEN
| BACKGROUND_BLUE
)
87 #endif /* def DISPLAY_COORD */
97 if (RES_LAST_INDEX
== *Index
)
99 *Index
= RES_FIRST_INDEX
;
121 _TEXT("ReactOS Coders Console Parade"),
123 (FOREGROUND_GREEN
| FOREGROUND_INTENSITY
)
129 #define RES_DELAY_CHANGE 12
130 #define RES_BUFFER_SIZE 1024
134 TCHAR NameString
[RES_BUFFER_SIZE
];
138 INT n
= RES_DELAY_CHANGE
;
145 if (n
== RES_DELAY_CHANGE
)
152 NameLength
= lstrlen(NameString
);
157 if (dir_x
== -1) dir_x
= 1;
159 else if (xy
.X
> 80 - NameLength
)
161 if (dir_x
== 1) dir_x
= -1;
167 if (dir_y
== -1) dir_y
= 1;
170 if (dir_y
== 1) dir_y
= -1;
176 #endif /* def DISPLAY_COORD */
199 myself
= GetModuleHandle(NULL
);
201 ScreenBuffer
= CreateConsoleScreenBuffer(
205 CONSOLE_TEXTMODE_BUFFER
,
208 if (INVALID_HANDLE_VALUE
== ScreenBuffer
)
212 _TEXT("%s: could not create a new screen buffer\n"),
217 SetConsoleActiveScreenBuffer(ScreenBuffer
);
219 CloseHandle(ScreenBuffer
);