#include "DxLib.h"
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) {
	ChangeWindowMode(true);  //ウィンドウモードの切り替え
	SetGraphMode(800, 600, 32); //ウインドウサイズの変更
	if (DxLib_Init() == -1)return(-1);   // DXライブラリ初期化処理

	int h = LoadGraph("画像/00.png"); //画像に付けられた出席番号を箱hに収納
	int x=100,y=100;//x座標とy座標の初期位置
	SetDrawScreen(DX_SCREEN_BACK); //裏画像を描画対象に加える（2017/06/28追加） 画面のちらつき対策
	while (ScreenFlip() == 0 && ProcessMessage() == 0 && ClearDrawScreen() == 0) {
		DrawGraph(x, y, h, true); //画像を描く
		if (CheckHitKey(KEY_INPUT_RIGHT) != 0) x+=2;
		if (CheckHitKey(KEY_INPUT_LEFT) != 0)x-=2;
		if (CheckHitKey(KEY_INPUT_DOWN) != 0)y+=2;
		if (CheckHitKey(KEY_INPUT_UP) != 0)y-=2;
	}
	WaitKey();      // キー入力待ち
	DxLib_End();    // DXライブラリ終了処理
	return 0;
}