📄 compic.h
字号:
#if !defined(AFX_COMPIC_H__291867DD_F08C_4063_A892_5D46E65503D2__INCLUDED_)
#define AFX_COMPIC_H__291867DD_F08C_4063_A892_5D46E65503D2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "resource.h"
#include <stdio.h>
#include <string.h>
#include <direct.h>
#include <time.h>
#include <shellapi.h>
#define ROW 5
#define LINE 4
#define RIGHT 0
#define DOWN 1
#define LEFT 2
#define UP 3
#define GMINIT 0
#define GMGOING 1
#define GMOVER 2
#define IDT_TIMER 1
HWND hWndMain; /* 主窗口句柄 */
RECT rc; /* 窗口大小 */
HBITMAP h_SmPicBm = NULL, /* 内存位图 */
h_PicBkGnd = NULL,
h_CliBm = NULL,
h_PicBm[LINE+5][ROW+5];
HDC h_MemDC = NULL; /* 内存DC */
HBRUSH hBrush, hBushText; /* 画刷 */
HPEN hPen; /* 画笔 */
int x_cell = 50, y_cell = 50, intSteps = 0;
int mouse_x =0, mouse_y = 0;
int mcur_y = 0, mcur_x = 0;
int cur_x = 0, cur_y = 0;
int gameStatus = GMINIT;
time_t startT = 0;
typedef struct mapStatus
{
int x;
int y;
int status;
int px;
int py;
}MAPSTATUS;
MAPSTATUS map[LINE+5][ROW+5];
HBITMAP apiLoadImage(char *pName, int cx, int cy);
int OnInit(HWND hWnd);
void apiBitBlt(HDC hDC, int x, int y, int cx, int cy);
void OnPaint(HDC hDC);
int OnMouseClick(HDC hdc);
int OnNewGame(HDC hDC);
int chkStatus(int x, int y, int *px, int *py);
void swapPic(MAPSTATUS *s, MAPSTATUS *t);
void drawPic(HDC hDC, int x, int y);
void displayText(int posx, int posy, char *text, int len);
char *curtime(char *fmt);
void showInfo();
void OnSetCursor();
void OnDragFile(WPARAM wParam);
extern int CutBmpFile(char *bmpName, char *s, int cx, int cy);
#endif // !defined(AFX_COMPIC_H__291867DD_F08C_4063_A892_5D46E65503D2__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -