资源简介
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使用详解
相关资源
- 基于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种三维茶壶显示源
- 断崖水刀工具箱 v5.1.zip
- 3D数学基础:图形与游戏开发(习题答
- 警察抓小偷游戏 x86版
- 最近点对的暴力法和递归法实现图形
- 谁说程序员不浪漫?!基于easyX图形库
- 飞机大战PlaneWar,Linux下gtk开发。
- 7-Uath茶壶
- 燕秀工具箱 v2.81.zip
- 3D图形程序设计酷跑游戏
- 营业执照自编自导v6.0官方免费绿色版
- visio2016科学图形包
- 万彩动画大师v2.5.6最新特别版64位
- 飞机图标~图形
- Microsoft Office Visio 科学图形包
- RT1052野火基于 RT-Thread 移植的littlevg
- 带开关电位器图形符号怎么画
- AxGlyph(矢量图绘制软件)v12.25免费安
评论
共有 条评论