资源简介
acllib.h acllib.c 用于教学
图形界面编程

代码片段和文件信息
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation either version 3 of the License or
(at your option) any later version.
This program is distributed in the hope that it will be useful
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not see .
*/
////////////////////////////////////////////////////////////////
// ACLLib - Advanced C Lab Library
// Ver. 2014-07
// For Students‘ Lab at Zhejiang University
// Created 2008 by Gao Yuan
// Modified 2009 by Cui Liwei
// 2010 by Lan Huidong
// Revised 2012 by Li Rui
// Modified 2014 by Weng Kai for MOOC
////////////////////////////////////////////////////////////////
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_NON_CONFORMING_SWPRINTFS
#define CINTERFACE
#ifdef _UNICODE
#undef _UNICODE
#endif
#ifdef UNICODE
#undef UNICODE
#endif
#include “acllib.h“
#include
#include
#include
#ifdef _MSC_VER
#pragma comment(lib“winmm.lib“)
#pragma comment(lib“msimg32.lib“)
#endif
#ifdef _DEBUG
#define ACL_ASSERT(_expressionerrStr) (void)( (!!(_expression)) || (acl_error(errStr)0) )
#else
#define ACL_ASSERT(flagerrStr) ((void)0)
#endif
#define ACL_ASSERT_HWND ACL_ASSERT(g_hWnd!=0 \
“You should call function \“initWindow(...)\“ befor use function \““ __FUNCTION__ “\““ )
#define ACL_ASSERT_BEGIN_PAINT ACL_ASSERT(g_hmemdc!=0 \
“You should call function \“beginPaint()\“ befor use function \““ __FUNCTION__ “\““ )
// f
int Setup(void);
const char g_wndClassName[] = “ACL_WND_CLASS“;
const char g_libName[] = “ACLLIB“;
HINSTANCE g_hInstance;
HWND g_hWnd = NULL;
HDC g_hmemdc = NULL;
HBITMAP g_hbitmap = NULL;
int g_wndHeight;
int g_wndWidth;
HPEN g_pen = NULL;
ACL_Color g_penColor = BLACK;
int g_penWidth = 1;
int g_penstyle = PEN_style_SOLID;
HBRUSH g_brush = NULL;
ACL_Color g_brushColor = BLACK;
int g_brushstyle = BRUSH_style_SOLID;
HFONT g_font = NULL;
char g_fontName[256] = “宋体“;
int g_textSize = 12;
ACL_Color g_textColor = BLACK;
ACL_Color g_textBkColor = WHITE;
int g_caretHeight = 12;
int g_caretWidth = 6;
int g_caretX = 0;
int g_caretY = 0;
int g_soundID = 0;
KeyboardEventCallback g_keyboard = NULL;
MouseEventCallback g_mouse = NULL;
TimerEventCallback g_timer = NULL;
CharEventCallback g_char = NULL;
LRESULT CALLBACK WndProc(HWND UINT WPARAM LPARAM);
//
void acl_error(char *errStr)
{
MessageBoxA(g_hWnderrStrg_libNameMB_IConerror);
exit(0);
}
//
int WINAPI WinMain(HINSTANCE hInstance HINSTANCE hPrevInstance PSTR szCmdLine int iCmdShow)
{
MSG msg;
WNDCLASSA wndclass;
g_hInstance = hInstance;
g_hWnd = NULL;
g_key
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6249 2014-08-08 10:22 acllib.h
文件 877505 2015-06-09 17:16 1 ACLLib.pdf
文件 188026 2015-06-09 17:17 acllib_doc.pdf
文件 18726 2014-08-08 10:22 acllib.c
----------- --------- ---------- ----- ----
1090506 4
- 上一篇:PSCAD4.2.1在win7_X64下的安装说明
- 下一篇:K60使用详解
相关资源
- 计算机图形学 边填充算法实现代码
- 嵌入式图形界面MiniGUI的示例程序9例
- 计算机图形学课设 画板
- 加密cad图形的lisp文件
- 一个比较完整的开源cad 图形程序
- c 图形面积计算 利用继承与多态
- vc利用MFC底层开发的二维GIS管理软件,
- 简单的交互式图形系统的实现
- 简易绘图程序(计算机图形学课程设
- 计算机图形学(openGL)代码
- 图形学集成程序dda、中点算法、多边
- 计算机图形实验(哈尔滨工程大学)
- Macromedia Fireworks V8.0 简体中文版
- 在delphi7下进行autocad二次开发的一个简
- 图像处理作业C 源代码
- 从EXCEL中取数据在Teechart7显示应用示例
- Scratch 鲨鱼来袭赢家版.sb3
- 基于SPCE061A单片机的图形液晶模块的驱
- 基于SPCE061A单片机的图形液晶模块的驱
- 超级场景清理器(SPCleaner)v1.0免费版
- raphael画各种简单的图形都可以拖动
- FMEDesktop2019特别版forMacv2019.0.0.0.19181苹
- 易语言123test源码易语言图形窗口的模
- Win7_x86 x64_EWF_FBWF(带EWFMGMT图形管理)
- 易语言超级图形模块源码
- D 6 R 4曲率校正,模块化图形函数和
- 图形数据—属性数据三步曲
- BricsysBricsCadPlatiniumv17.2.12.1Linux64位免费
- 计算机图形学-全.rar
- 图形学 - OpenGL实现3种三维茶壶显示源
评论
共有 条评论