#include <stdio.h>
#include <conio.h>
#define ESC 27
#define ENTER 13
#define HOME 71
#define END 79
#define L_KEY 75
#define R_KEY 77
#define U_KEY 72
#define D_KEY 80
struct pos{
int x, y;
}coord;
void main(void){
char c;
coord.x=coord.y=1;
_setcursortype(_NOCURSOR);
do{
c=getch();
clrscr();
switch(c){
case L_KEY: coord.x--; break;
case R_KEY: coord.x++; break;
case U_KEY: coord.y--; break;
case D_KEY: coord.y++; break;
}
gotoxy(coord.x,coord.y);
printf("O");
}while(c!=ESC);
}
How can i do the that but in win32 code?
Thanx
move a "O"
Hello i have this code in TC
quote:
How can i do the that but in win32 code?
Like with windows and stuff?
Check this tutorial: http://www.winprog.org/tutorial/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement