Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

bluestrattos

move a "O"

This topic is 5560 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello i have this code in TC
#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

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!