资源简介
画板的实现非常有趣,首先要新建一张HBITMAP来保存原来的绘制内容,然后需要创建一个可拉伸的输入框,供用户输入文字。必要时还得提供UnDo功能,供用户取消上一次绘制的功能。
利用业余时间,我制作了一个画板程序,包含了以下几个功能:
1. 可动态拉伸及移动位置的编辑框,供用户输入文字。
2. 可画直线,圆圈,箭头,线段及线条。
3. 可使用CTRL+Z组合键,撤销上一次的绘制。
原文博客:http://blog.csdn.net/renstarone/article/details/19901585">画板的实现非常有趣,首先要新建一张HBITMAP来保存原来的绘制内容,然后需要创建一个可拉伸的输入框,供用户输入文字。必要时还得提供UnDo功能,供用户取消上一次绘制的功能。
利用业余时间,我制作了一个画板程序,包含 [更多]

代码片段和文件信息
// PaintWindow_Test.cpp : main source file for PaintWindow_Test.exe
//
#include “stdafx.h“
#include ame.h>
#include
#include
#include “resource.h“
#include “aboutdlg.h“
#include “MainDlg.h“
#include
#pragma comment(lib “gdiplus.lib“)
using namespace Gdiplus;
CAppModule _Module;
int Run(LPTSTR /*lpstrCmdLine*/ = NULL int nCmdShow = SW_SHOWDEFAULT)
{
CMessageLoop theLoop;
_Module.AddMessageLoop(&theLoop);
CMainDlg dlgMain;
if(dlgMain.Create(NULL) == NULL)
{
ATLTRACE(_T(“Main dialog creation failed!\n“));
return 0;
}
dlgMain.ShowWindow(nCmdShow);
int nRet = theLoop.Run();
_Module.RemoveMessageLoop();
return nRet;
}
int WINAPI _tWinMain(HINSTANCE hInstance HINSTANCE /*hPrevInstance*/ LPTSTR lpstrCmdLine int nCmdShow)
{
//HRESULT hRes = ::CoInitialize(NULL);
// If you are running on NT 4.0 or higher you can use the following call instead to
// make the EXE free threaded. This means that calls come in on a random RPC thread.
HRESULT hRes = ::CoInitializeEx(NULL COINIT_MULTITHREADED);
ATLASSERT(SUCCEEDED(hRes));
GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
GdiplusStartup(&gdiplusToken &gdiplusStartupInput NULL);
// this resolves ATL window thunking problem when Microsoft layer for Unicode (MSLU) is used
::DefWindowProc(NULL 0 0 0L);
AtlInitCommonControls(ICC_BAR_CLASSES); // add flags to support other controls
hRes = _Module.Init(NULL hInstance);
ATLASSERT(SUCCEEDED(hRes));
int nRet = Run(lpstrCmdLine nCmdShow);
_Module.Term();
::CoUninitialize();
GdiplusShutdown(gdiplusToken);
return nRet;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-02-25 11:02 PaintWindow_Test\
目录 0 2014-02-25 11:02 PaintWindow_Test\PaintWindow_Test\
文件 914 2013-11-06 10:22 PaintWindow_Test\PaintWindow_Test.sln
文件 132096 2014-02-25 11:02 PaintWindow_Test\PaintWindow_Test.suo
文件 1048 2013-11-06 10:22 PaintWindow_Test\PaintWindow_Test\AboutDlg.h
文件 7698 2014-02-14 11:04 PaintWindow_Test\PaintWindow_Test\BitmapEdit.h
文件 11887 2013-11-19 11:44 PaintWindow_Test\PaintWindow_Test\Canvas.h
文件 6580 2014-02-14 11:07 PaintWindow_Test\PaintWindow_Test\CanvasWnd.h
文件 12179 2013-11-11 09:21 PaintWindow_Test\PaintWindow_Test\CustomButton.h
文件 1929 2013-10-31 10:12 PaintWindow_Test\PaintWindow_Test\CustomFont.h
文件 2700 2013-11-06 11:10 PaintWindow_Test\PaintWindow_Test\GDIHelper.h
文件 10659 2013-11-14 08:44 PaintWindow_Test\PaintWindow_Test\GdiplusHelper.h
文件 6576 2014-02-25 09:46 PaintWindow_Test\PaintWindow_Test\MainDlg.h
文件 30588 2014-02-25 09:23 PaintWindow_Test\PaintWindow_Test\PaintWindow_Test.aps
文件 1709 2013-11-13 14:08 PaintWindow_Test\PaintWindow_Test\PaintWindow_Test.cpp
文件 186880 2014-02-25 11:01 PaintWindow_Test\PaintWindow_Test\PaintWindow_Test.exe
文件 23 2013-11-06 10:22 PaintWindow_Test\PaintWindow_Test\PaintWindow_Test.h
文件 8565 2014-02-25 09:23 PaintWindow_Test\PaintWindow_Test\PaintWindow_Test.rc
文件 5822 2013-11-14 15:11 PaintWindow_Test\PaintWindow_Test\PaintWindow_Test.vcproj
文件 1405 2014-02-25 11:02 PaintWindow_Test\PaintWindow_Test\PaintWindow_Test.vcproj.MING.Administrator.user
文件 1407 2013-11-20 19:39 PaintWindow_Test\PaintWindow_Test\PaintWindow_Test.vcproj.PC111.Administrator.user
目录 0 2014-02-25 11:02 PaintWindow_Test\PaintWindow_Test\Release\
文件 186880 2014-02-25 11:01 PaintWindow_Test\PaintWindow_Test\Release\PaintWindow_Test.exe
目录 0 2013-11-06 16:31 PaintWindow_Test\PaintWindow_Test\res\
文件 15398 2014-02-25 09:37 PaintWindow_Test\PaintWindow_Test\ResizeCtrl.h
文件 832 2014-02-25 09:20 PaintWindow_Test\PaintWindow_Test\resource.h
文件 12514 2013-11-06 16:31 PaintWindow_Test\PaintWindow_Test\res\BTN_GREEN.PNG
文件 1078 2008-02-07 03:17 PaintWindow_Test\PaintWindow_Test\res\PaintWindow_Test.ico
文件 293 2013-11-06 10:22 PaintWindow_Test\PaintWindow_Test\stdafx.cpp
文件 1465 2013-11-06 10:25 PaintWindow_Test\PaintWindow_Test\stdafx.h
- 上一篇:VC++ WTL 9.0 安装包
- 下一篇:51单片机-液晶屏交通灯.
相关资源
- VC++ 多线程文件读写操作
- 移木块游戏,可以自编自玩,vc6.0编写
- VC++MFC小游戏实例教程(实例)+MFC类库
- VC++实现CMD命令执行与获得返回信息
- VC++基于OpenGL模拟的一个3维空间模型
- 基于VC++的SolidWorks二次开发SolidWorks
- 派克变换VC++源码(附文档)
- VC++ 串口
- VC++ 大富翁4_大富翁游戏源码
- VC++ 摄像头视频采集与回放源程序
- 转 VC++ 实现电子邮件(Email)发送
- 基于MFC的VC++仿QQ浏览器源码(雏形)
- VC++ 服务程序编写及安装与卸载
- VC++6.0番茄西红柿VAXvirsual assist X完美破
- 基于改进的fcm算法的图像分割vc++
- VC++6.0 绿色版,免安装,非常好用。
- Microsoft Visual C++ 2005 Redistributable Pack
- VC++MFC课程设计的学生成绩管理系统
- 大智慧365DLL插件设计
- VC++6.0汉化包
- VC++完整商业界面源码(再上传)
- VC++编程技术600个大型项目源码.rar
- VC++实现RSA加密算法
- VC++ 中国象棋经典游戏源代码
- 郁金香VC++游戏辅助视频教程
- C语言进阶源码---基于graphics实现图书
- 摄影测量相对定向VC++程序
- VC++数字图像处理典型算法及实现
- VC++酒店客房管理系统 MFC
- 车站计算机联锁vc++6.0程序代码
评论
共有 条评论