
win32-api
文章平均质量分 92
wowocpp
这个作者很懒,什么都没留下…
展开
-
win7 下面 libusb 开发 研究 记录
下载:http://libusb.sourceforge.net/api-1.0/modules.html下载:libusb-master.zip进入 libusb-master\msvc双击 libusb_static_2017.vcxproj编译会生成 libusb-master\Win32\Debug\lib\libusb-1.0.lib 静态文件然后打开:libusb-ma...原创 2020-05-06 16:32:51 · 830 阅读 · 0 评论 -
win32 WaitForSingleObject
参考网页:https://msdn.microsoft.com/en-us/library/windows/desktop/ms687032(v=vs.85).aspxUsing Mutex Objects (很好的例子)https://msdn.microsoft.com/en-us/library/windows/desktop/ms686927(v=vs.85).aspxWa...原创 2018-06-01 09:59:31 · 620 阅读 · 0 评论 -
win32 CreateCompatibleDC
CreateCompatibleDC 该函数创建一个兼容指定设备的内存device context(DC)HDC CreateCompatibleDC( HDC hdc)参数:hdc 指向一个存在的DC的句柄。如果参数为NULL,该函数将会创建一个兼容应用当前视图的内存DC。返回值如果失败,返回NULL 如果成功,返回值为指向内存DC的句柄。备注内存DC只...原创 2018-06-26 16:15:23 · 1002 阅读 · 0 评论 -
win32 BITMAPINFO RGBQUAD
The BITMAPINFO structure defines the dimensions and color information for a DIB.typedef struct tagBITMAPINFO { BITMAPINFOHEADER bmiHeader; RGBQUAD bmiColors[1];} BITMAPINFO, *PBITMAPIN...原创 2018-07-01 17:16:35 · 336 阅读 · 0 评论 -
win32 显示 带调色板 的BMP文件
win7 64位 创建 一个 MFC 对话框程序: 添加一个按钮: 按钮的 点击事件处理函数内容如下:代码主要演示 函数的用法 void CBMP_SHOW_PLADlg::OnBnClickedBtnShowBmpPla(){ // TODO: 在此添加控件通知处理程序代码 OPENFILENAME ofn ; static TCHAR ...原创 2018-07-01 17:38:30 · 460 阅读 · 0 评论 -
win32 CreateCompatibleBitmap and Scaling an Image
The CreateCompatibleBitmap function creates a bitmap compatible with the device that is associated with the specified device context.HBITMAP CreateCompatibleBitmap( HDC hdc, int cx, int cy);...原创 2018-06-26 16:28:24 · 921 阅读 · 0 评论 -
win32 GetDIBits
The GetDIBits function retrieves the bits of the specified compatible bitmap and copies them into a buffer as a DIB using the specified format.int GetDIBits( HDC hdc, HBITMAP hbm,...原创 2018-06-26 17:03:40 · 905 阅读 · 0 评论 -
win32 CreateDIBitmap 显示 BMP 文件
win32 CreateDIBitmapwin7 64位 创建 一个 MFC 对话框程序: 添加一个按钮: 按钮的 点击事件处理函数内容如下:代码主要演示 函数的用法void CDIBCONVDlg::OnBnClickedBtnShowBmp(){ // TODO: 在此添加控件通知处理程序代码 OPENFILENAME ofn ; st...原创 2018-07-02 14:49:21 · 915 阅读 · 0 评论 -
win32 GetObject And Storing an Image
GetObject 函数The GetObject function retrieves information for the specified graphics object.int GetObject( __in HGDIOBJ hgdiobj, __in int cbBuffer, __out LPVOID lpvObject);Parameters...原创 2018-07-02 14:58:38 · 396 阅读 · 0 评论 -
win32 Bitblt And Capturing an Image
The BitBlt function performs a bit-block transfer of the color data corresponding to a rectangle of pixels from the specified source device context into a destination device context.This function tr...原创 2018-06-26 11:53:23 · 1209 阅读 · 0 评论 -
windows程序设计(第5版) 第14章 位图和Bitblt
位图是一个二维的位数组,它与图像的像素一一对应。 位图和BMP文件不是同一个概念, BMP文件应该是 DIB(device-independent bitmap)设备无关的位图。矢量图像和光栅图像的区别。 位图矩形的,但是计算机是线性的。 通常,位图按行存储在内存中,而且从顶行像素到底行结束。 每一行,像素都是从最左边的像素开始,一次向右存储。可以将视频显示器看作一个大位图。...原创 2018-06-26 10:53:25 · 327 阅读 · 0 评论 -
win32 CreatePalette LOGPALETTE PALETTEENTRY
The CreatePalette function creates a logical palette.HPALETTE CreatePalette( __in const LOGPALETTE *lplgpl);Parameterslplgpl [in] A pointer to a LOGPALETTE structure that contains informa...原创 2018-06-30 21:48:19 · 500 阅读 · 0 评论 -
Win32和mfc下弹出console窗口的方法
在C**App InitInstance()中 调出console窗口 BOOL CWinApp::InitInstance() AllocConsole(); SetConsoleTitle(“debug console”); freopen(“CONOUT$”,”w”,stdout); 重载ExitInstance()函数,释放Console。 Fr...原创 2018-06-24 00:31:05 · 763 阅读 · 0 评论 -
win32 BITMAPINFOHEADER 结构体 --- 40 字节
https://msdn.microsoft.com/en-us/library/windows/desktop/dd183376(v=vs.85).aspxThe BITMAPINFOHEADER structure contains information about the dimensions and color format of a DIB.typedef struct t...原创 2018-06-29 12:13:52 · 906 阅读 · 0 评论 -
win32 BITMAPFILEHEADER --- 14字节
The BITMAPFILEHEADER structure contains information about the type, size, and layout of a file that contains a DIB.typedef struct tagBITMAPFILEHEADER { WORD bfType; DWORD bfSize; WORD bfRese...原创 2018-06-29 14:03:31 · 392 阅读 · 0 评论 -
windows 坐标系 与 BMP 像素的映射关系
Windows坐标系如下 : 设备坐标系的X、Y轴的方向是固定的,单位也是固定的,X轴向右递增,Y向下递增,设备点(0,0)始终是客户区、窗口区或者屏幕区的左上角 如下图: BMP 取数据:(其中的一种情况,共两种情况)共5行,每行不足4个字节的倍数的,需要补足4个字节。 从左下角开始...原创 2018-06-25 18:09:53 · 1296 阅读 · 0 评论 -
BITMAPV5HEADER
The BITMAPV5HEADER structure is the bitmap information header file. It is an extended version of the BITMAPINFOHEADER structure.typedef struct { DWORD bV5Size; LONG bV5Width; ...原创 2018-06-30 11:11:02 · 735 阅读 · 0 评论 -
win32 BITMAPCOREHEADER 结构体
The BITMAPCOREHEADER structure contains information about the dimensions and color format of a DIB.typedef struct tagBITMAPCOREHEADER { DWORD bcSize; WORD bcWidth; WORD bcHeight; WORD b...原创 2018-06-30 11:17:57 · 350 阅读 · 0 评论 -
win32 BITMAPV4HEADER 结构体
The BITMAPV4HEADER structure is the bitmap information header file. It is an extended version of the BITMAPINFOHEADER structure.Applications can use the BITMAPV5HEADER structure for added functional...原创 2018-06-30 11:23:48 · 439 阅读 · 0 评论 -
win32 显示 BMP 文件的 文件头信息
win7 64 位 使用 vs2010 创建一个 MFC工程 ,添加一个按钮, 在按钮的事件处理函数里面,添加如下代码:void CBMP_HEAD_TESTDlg::OnBnClickedBtnReadBmp(){ // TODO: 在此添加控件通知处理程序代码 OPENFILENAME ofn ; static TCHAR szFileNam...原创 2018-06-30 21:34:06 · 451 阅读 · 0 评论 -
win32 CreateDIBitmap ---- 根据 DIB文件 创建 Bitmap
The CreateDIBitmap function creates a compatible bitmap (DDB) from a DIB and, optionally, sets the bitmap bits.HBITMAP CreateDIBitmap( __in HDC hdc, __in const BITMAPINFOHEADER *lpbmih, __in...原创 2018-07-02 15:11:16 · 992 阅读 · 0 评论 -
win32 Bitmaps 介绍 DDB DIB 区别
About Bitmapshttps://docs.microsoft.com/zh-cn/windows/desktop/gdi/about-bitmapsA bitmap is one of the GDI objects that can be selected into a device context (DC). Device contexts are structures ...原创 2018-06-27 16:02:43 · 926 阅读 · 0 评论 -
win32 Bitmap Storage
Bitmap Storagehttps://docs.microsoft.com/zh-cn/windows/desktop/gdi/bitmap-storage Bitmaps should be saved in a file that uses the established bitmap file format and assigned a name with the three-c...原创 2018-06-27 16:10:41 · 286 阅读 · 0 评论 -
win32 BITMAP 结构
The BITMAP structure defines the type, width, height, color format, and bit values of a bitmap.typedef struct tagBITMAP { LONG bmType; LONG bmWidth; LONG bmHeight; LONG bmWidthBytes;...原创 2018-07-04 14:34:19 · 1077 阅读 · 0 评论 -
win32 位图 Bitmap 和 Bitblt 演示
针对《Windows 程序设计》第五版 第14章 14.4.5 单色位图格式 win7 64位,vs2010 建立一个 MFC 对话框 , 添加三个按钮: 三个按钮的点击事件的处理函数 代码分别如下:左边的按钮:void CBitmapTestDlg::OnBnClickedBtnTest(){ // TODO: 在此添加控件通知处理程序代码 BITM...原创 2018-07-04 16:46:28 · 2944 阅读 · 0 评论 -
win32 SetDIBits
SetDIBits The SetDIBits function sets the pixels in a compatible bitmap (DDB) using the color data found in the specified DIB.int SetDIBits( __in HDC hdc, __in HBITMAP hbmp, __in UINT u...原创 2018-07-04 17:44:41 · 667 阅读 · 0 评论 -
DIB DDB 读书笔记 与 理解
《windows 程序设计》 第5版 北京大学出版社的版本 第754页 —- 从DDB到DIB 看划线的位置 , DIB 转换为设备相关的格式(DDB)的时候,有一些信息丢失了。 DIB转换为DDB都用到了那些参数呢? Page746 和 Page747 ,需要重点看Page708,Page709 SetDIBitsToDevice的参数: 注意这个...原创 2018-07-05 10:41:06 · 310 阅读 · 0 评论 -
win32 PatBlt
The PatBlt function paints the specified rectangle using the brush that is currently selected into the specified device context. The brush color and the surface color or colors are combined by using t...原创 2018-07-05 12:11:59 · 334 阅读 · 0 评论 -
win32 SetPixel
SetPixel The SetPixel function sets the pixel at the specified coordinates to the specified color.COLORREF SetPixel( __in HDC hdc, __in int X, __in int Y, __in COLORREF crColor);Par...原创 2018-07-05 12:17:25 · 666 阅读 · 0 评论 -
win32 CreateDIBSection ----- 根据DIB 文件 创建 bitmap
CreateDIBSection The CreateDIBSection function creates a DIB that applications can write to directly. The function gives you a pointer to the location of the bitmap bit values. You can supply a hand...原创 2018-07-05 12:50:40 · 674 阅读 · 0 评论 -
win32 BMP 题目:二维码点阵图数据 显示 并保存为BMP文件
二维码点阵图数据 显示 并保存为BMP文件 将二维码对应的点阵数组,显示在窗口,并将其保存为BMP文件。可能用到的方法: m_pSymbleBitmap = new CBitmap; m_pSymbleBitmap->CreateBitmap(m_nSymbleSize, m_nSymbleSize, 1, 1, NULL); ...原创 2018-07-05 13:12:26 · 1126 阅读 · 0 评论 -
win32 GetDeviceCaps
The GetDeviceCaps function retrieves device-specific information for the specified device.int GetDeviceCaps( __in HDC hdc, __in int nIndex);Parametershdc [in] A handle to the DC.nIndex...原创 2018-07-04 10:36:02 · 1306 阅读 · 0 评论 -
win32 CreateBitmap
The CreateBitmap function creates a bitmap with the specified width, height, and color format (color planes and bits-per-pixel).HBITMAP CreateBitmap( __in int nWidth, __in int nHeight, __in ...原创 2018-07-04 10:26:19 · 1716 阅读 · 0 评论 -
CreateDIBSection
网址: https://www.cnblogs.com/bigbigtree/archive/2012/02/09/2343476.html 分辨率 我们常说的屏幕分辨率为640×480,刷新频率为70Hz,意思是说每行要扫描640个象素,一共有480行,每秒重复扫描屏幕70次。调色板 有一个长宽各为200个象素,颜色数为16色的彩色图,每一个象素都用R、G、B三个分量表示。因为每...转载 2018-06-27 17:52:12 · 2343 阅读 · 0 评论 -
win32 CreateDIBSection显示 BMP 文件
win32 CreateDIBSectionwin7 64位 创建 一个 MFC 对话框程序: 添加一个按钮: 按钮的 点击事件处理函数内容如下:代码主要演示 函数的用法void CDIBSECTDlg::OnBnClickedBtnShowBmp(){ // TODO: 在此添加控件通知处理程序代码 OPENFILENAME ofn ; s...原创 2018-07-03 10:27:31 · 1592 阅读 · 0 评论 -
win32 BitBlt 函数 代码测试
针对 《windows程序设计》第5版 第14章win7 64位,创建一个MFC 对话框 程序, 在界面添加一个 按钮和 一个 spin control 控件 效果如下: 用MarkMan标记一下,坐标和尺寸: Test按钮的点击事件代码如下:void CBitBltTestDlg::OnBnClickedBtnTest(){ // TODO: 在此添加控件通...原创 2018-07-03 17:27:06 · 1151 阅读 · 0 评论 -
win32 StretchBlt 函数 代码测试
针对 《windows程序设计》第5版 第14章win7 64位,创建一个MFC 对话框 程序, 在界面添加一个 按钮和 一个 spin control 控件 效果如下: Test按钮的点击事件代码如下:void CStretchBltTestDlg::OnBnClickedBtnTest(){ // TODO: 在此添加控件通知处理程序代码 HWND h...原创 2018-07-03 17:54:11 · 664 阅读 · 0 评论 -
ATL active控件 VS2010开发
win7 64位 IE8 32位1、创建工程首先打开vs2010,创建一个ActiveX工程: E:\VC\activeX\EtcNfcRC522\EtcNFComm\EtcNFComm项目设置: 项目创建成功:2、设置IE联合调试C:\Program Files (x86)\Internet Explorer\iexplore.exe$(Projec...原创 2018-07-10 17:30:01 · 659 阅读 · 0 评论 -
bmp格式研究
你所能用到的BMP格式介绍(一)https://www.cnblogs.com/ZXYloveFR/archive/2012/08/06/2625225.html二、从简单的24位bmp开始 bmp是最常见也是编码方式最简单的图片格式,这里不说明一幅图片是怎么显示在电脑上的,那不是多媒体技术研究的问题,我们来研究bmp的格式问题,为了使各位能够最快的了解bmp格式,我们从24位的一...原创 2018-06-23 11:07:59 · 425 阅读 · 0 评论 -
win32 MFC 对话框 显示 BMP 文件(二) 可显示单色BMP图
win7 64 vs2010 使用vs2010 创建一个MFC 对话框 添加 两个按钮,其实两个按钮的 实现的代码 类似 ,只是 分配内存的地方 一个是用的malloc ,一个是用的HeapAlloc。看一下具体一个按钮的点击事件:void CbmpTestBDlg::OnBnClickedBtnBmpTest(){ // TODO: 在此添加控件通知处理程序代码...原创 2018-06-24 17:44:19 · 513 阅读 · 0 评论