摘要: // jhgj.cpp : 定义应用程序的入口点。//#include "stdafx.h"#include "jhgj.h"#include <objidl.h>#include <GdiPlus.h>using namespace Gdiplus;#pragma comment (lib,"Gdiplus.lib")#define MAX_LOADSTRING 100VOID OnPaint(HDC hdc){ Graphics graphics(hdc); Pen pen(Color(255, 0, 0, 阅读全文
posted @ 2013-04-12 17:26 fff8965 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.codeproject.com/Articles/7443/DFB-vs-DIBIntroductionWhat is a bitmap and what is a DIB? Is there a difference? Why the Windows API has such functions asCreateBitmap,CreateCompatibleBitmap,CreateDIBitmap, andCreateDIBSection? And what is the difference betweenSetBitmapBitsandSetDIBits?H 阅读全文
posted @ 2013-04-12 17:07 fff8965 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 位图分为两种DDB和DIB DIB:即兼容位图,独立于设备存在,有描述颜色格式的信息头,如256色1字节、真色彩argb。存在于内存中,是我们写程序的时候能控制的有位图数据格式的数据 DDB:即设备位图,已经被gdi考到显存后的图像格式,没有信息头,显示格式就是当前的显示设备支持的格式。是我们不能控制的,我们只能通知gdi将某个DIB转化为DDB拷贝到显存显示,是不能直接控制DDB的获得DIB的数据: 直接用GetBitmapBits获得DDB的数据: 将位图画到一个自己创建的兼容DC,再创建一个兼容DIB位图,用BitBlt把数据从当前DC拷贝到兼容位图,再用GetBitmap... 阅读全文
posted @ 2013-04-12 11:53 fff8965 阅读(901) 评论(0) 推荐(0) 编辑