资源简介
数字九宫格自动排序问题实验,八数码求解过程动态演示源代码-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
相关资源
- Windows异步套接字网络编程
- VC 获得文件属性 获取文件的创建时
- 基于MVC模式的会员管理系统
- silicon lab公司的收音IC SI47XX全套开发工
- 读者写者问题(读者优先,写者优先
- MFC程序-碰撞的小球
- vc 柱形图 CBarChart
- 用vc 写的导线测量,针对刚学测绘的
- 用VC 编写的仿QQ聊天室程序源代码
- 栅栏填充算法源码(VC)
- 简单的房屋租赁系统
- .net网站服装销售系统(MVC)
-
ob
jectARX给Auto CAD加工具条 - blowfish的vc2008工程.rar
- 画图程序MFC/VC/VC CRectTracker 串行化
- capon波束形成算法-VC实现
- 读取串口数据并画实时曲线的VC 程序
- VC 游戏编程—附源代码
- IpHlpApi.h&IpHlpApi.lib
- vc 6.0开发的流程图编辑器
- VC 天空盒(skyBox)实现(附源代码)
- c MFC 画多边形
- keil vcom windows 7 64bit 驱动
- vc URL编解码类
- vc编写中国象棋详细源码注释并附有视
- VC 围棋源代码
- 用VC 编写的基于SNMP的路由器拓扑程序
- vc利用MFC底层开发的二维GIS管理软件,
- 兰勃托地图投影VC源码
- 清华大学郑莉C 语言程序设计课件
评论
共有 条评论