资源简介
数字九宫格自动排序问题实验,八数码求解过程动态演示源代码-Digital Jiugongge automatic test scheduling problem, eight digital dynamic presentation source code solution process
代码片段和文件信息
// 9Gird.cpp : Defines the entry point for the application.
// Download by http://www.codefans.net
//
// Created by ZhaoHongWei 2004-12-6
// Feel free to use this code in any way you want.
#include “stdafx.h“
#include “resource.h“
#include “NineGird.h“
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; // current instance
TCHAR sztitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text
CNineGird g_9Gird;
// Foward declarations of functions included in this code module:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE int);
LRESULT CALLBACK WndProc(HWND UINT WPARAM LPARAM);
LRESULT CALLBACK About(HWND UINT WPARAM LPARAM);
int APIENTRY WinMain(HINSTANCE hInstance
HINSTANCE hPrevInstance
LPSTR lpCmdLine
int nCmdShow)
{
// TODO: Place code here.
MSG msg;
HACCEL hAccelTable;
// Initialize global strings
LoadString(hInstance IDS_APP_title sztitle MAX_LOADSTRING);
LoadString(hInstance IDC_MY9GIRD szWindowClass MAX_LOADSTRING);
MyRegisterClass(hInstance);
// Perform application initialization:
if (!InitInstance (hInstance nCmdShow))
{
return FALSE;
}
hAccelTable = LoadAccelerators(hInstance (LPCTSTR)IDC_MY9GIRD);
// Main message loop:
while (GetMessage(&msg NULL 0 0))
{
if (!TranslateAccelerator(msg.hwnd hAccelTable &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
}
ATOM MyRegisterClass(HINSTANCE hInstance)
{
WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance (LPCTSTR)IDI_MY9GIRD);
wcex.hCursor = LoadCursor(NULL IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = (LPCSTR)IDC_MY9GIRD;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance (LPCTSTR)IDI_SMALL);
return RegisterClassEx(&wcex);
}
BOOL InitInstance(HINSTANCE hInstance int nCmdShow)
{
HWND hWnd;
hInst = hInstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass sztitle WS_OVERLAPPEDWINDOW
CW_USEDEFAULT 0 CW_USEDEFAULT 0 NULL NULL hInstance NULL);
if (!hWnd)
{
return FALSE;
}
SetWindowPos(hWnd NULL 0 0 400 210 NULL );
ShowWindow(hWnd nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
LRESULT CALLBACK WndProc(HWND hWnd UINT message WPARAM wParam LPARAM lParam)
{
int wmId wmEvent;
PAINTSTRUCT ps;
HDC hdc;
RECT rt;
GetClientRect(hWnd &rt);
switch (message)
{
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4621 2009-09-04 14:55 9Gird.cpp
文件 4662 2004-12-05 22:37 9Gird.dsp
文件 535 2004-12-04 15:13 9Gird.dsw
文件 450 2009-09-04 14:55 9Gird.h
文件 1078 2004-12-04 19:03 9Gird.ICO
文件 3801 2004-12-06 11:56 9Gird.rc
文件 10880 2009-09-04 14:55 NineGird.cpp
文件 1395 2009-09-04 14:55 NineGird.h
文件 2055 2004-12-04 12:34 ReadMe.txt
文件 20 2011-05-11 21:20 Read_Me.txt
文件 1076 2009-09-04 14:55 resource.h
文件 318 2004-12-05 12:31 SMALL.ICO
文件 330 2009-09-04 14:55 StdAfx.cpp
文件 1013 2009-09-04 14:55 StdAfx.h
----------- --------- ---------- ----- ----
32234 14
相关资源
- devcon.rar
- 种子填充算法VC程序.rar
- ISOIEC 14496-15 Advanced Video Coding (AVC)
- VC编写的简单聊天程序
- SSMSpring MVC、Spring、Mybatis三大框架搭载
- msvcr120d.dll.rar
- 虚拟摄像头开发SDK及调用DEMO源代码
- 从网络抓包中提取RTP包,RTP解包为H
- VC读写文件,从文件中读数据然后写入
- 网际校验和算法VC源码
- Unicode串口通信Demo
- 基于SVC的矿井提升机谐波抑制技术研
- 中国可再生能源发电对火力发电技术
- DSP的VCM低频主动隔振控制系统设计
- Steema TeeChart Pro VCL FMX注册机
- FastReport VCL v5.4.6 Pro for D7-D10.2 Full So
- Delphi 摄像头识别条码 二维码 ZXing
- SAA中文题库 - 修正版.vce
- 最新VS.Net自定义控件DevComponents.DotNe
- 用cadenceSpectreRF仿真LNA、MIXER、VCO的详
- VC读写多级指针植物大战僵尸版
- VC动态库导出类调用
- VMWARE Vcp 题库
- 基于VC33主动磁轴承控制系统的设计
- VMware-VCSA-all-7.0.0-16620007 天翼云盘速度
- DevExpressVCL 17.2.4自带图标
- DevExpressVCL19.1.2,D7___10.3可用一键安装
- DevExpress VCL 18.2.5 Chinese files.rar
- devexpressVCL19.1.2版汉化文件重新修正版
- DevExpress VCL 19.1.2整套汉化包(源码版
评论
共有 条评论