목록WindowAPI (4)
빙수달 게임 개발 노트
#include "framework.h"#include "Alkanoid.h"#include #include #include #define MAX_LOADSTRING 100#define BSIZE 10 // 원의 반지름class CCircle{public: int mx; int my; float VectorX; float VectorY; void DrawCircle(HDC hdc); // 원 화면에 출력 void Initialize(int x, int y); // 원 그려지는 시작점 void Translate(); // 원 이동 void WallCrash(); // 원이 벽 충돌할 때 void..
윈도우 프로시저 내부만 작성하였다.LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){ HDC hdc; PAINTSTRUCT ps; HBRUSH hBrush, oldBrush; static POINT pos; static RECT rectView; static bool flag_East; static bool flag_South; static bool flag_West; static bool flag_North; switch (message) { case WM_CREATE: { pos.x = 50; pos.y = 50; ..
// Caret.cpp : 애플리케이션에 대한 진입점을 정의합니다.//#include "framework.h"#include "Caret.h"#define MAX_LOADSTRING 100void DrawGrid(HDC hdc, POINT center, int Width, int Height, int Count){ int Row_count = Height / Count; int Col_count = Width / Count; POINT startPoint = { center.x - Width / 2, center.y - Height / 2 }; POINT endPoint{ center.x + Width / 2, center.y + Height / 2 }; // 행 출력 ..
// Caret.cpp : 애플리케이션에 대한 진입점을 정의합니다.//#include "framework.h"#include "Caret.h"#define MAX_LOADSTRING 100void DrawCircle(HDC hdc, POINT center, int Radius){ Ellipse(hdc, center.x, center.y, Radius, Radius);}// 전역 변수:HINSTANCE hInst; // 현재 인스턴스입니다.WCHAR szTitle[MAX_LOADSTRING]; // 제목 표시줄 텍스트입니다.WCHAR szWindowClass[MAX_LOADSTRING]; // 기..