========================================================================
MICROSOFT FOUNDATION CLASS LIBRARY : DrawBmp
========================================================================
AppWizard has created this DrawBmp application for you. This application
not only demonstrates the basics of using the Microsoft Foundation classes
but is also a starting point for writing your application.
This file contains a summary of what you will find in each of the files that
make up your DrawBmp application.
DrawBmp.dsp
This file (the project file) contains information at the project level and
is used to build a single project or subproject. Other users can share the
project (.dsp) file, but they should export the makefiles locally.
DrawBmp.h
This is the main header file for the application. It includes other
project specific headers (including Resource.h) and declares the
CDrawBmpApp application class.
DrawBmp.cpp
This is the main application source file that contains the application
class CDrawBmpApp.
DrawBmp.rc
This is a listing of all of the Microsoft Windows resources that the
program uses. It includes the icons, bitmaps, and cursors that are stored
in the RES subdirectory. This file can be directly edited in Microsoft
Visual C++.
DrawBmp.clw
This file contains information used by ClassWizard to edit existing
classes or add new classes. ClassWizard also uses this file to store
information needed to create and edit message maps and dialog data
maps and to create prototype member functions.
res\DrawBmp.ico
This is an icon file, which is used as the application's icon. This
icon is included by the main resource file DrawBmp.rc.
res\DrawBmp.rc2
This file contains resources that are not edited by Microsoft
Visual C++. You should place all resources not editable by
the resource editor in this file.
/////////////////////////////////////////////////////////////////////////////
For the main frame window:
MainFrm.h, MainFrm.cpp
These files contain the frame class CMainFrame, which is derived from
CFrameWnd and controls all SDI frame features.
res\Toolbar.bmp
This bitmap file is used to create tiled images for the toolbar.
The initial toolbar and status bar are constructed in the CMainFrame
class. Edit this toolbar bitmap using the resource editor, and
update the IDR_MAINFRAME TOOLBAR array in DrawBmp.rc to add
toolbar buttons.
/////////////////////////////////////////////////////////////////////////////
AppWizard creates one document type and one view:
DrawBmpDoc.h, DrawBmpDoc.cpp - the document
These files contain your CDrawBmpDoc class. Edit these files to
add your special document data and to implement file saving and loading
(via CDrawBmpDoc::Serialize).
DrawBmpView.h, DrawBmpView.cpp - the view of the document
These files contain your CDrawBmpView class.
CDrawBmpView objects are used to view CDrawBmpDoc objects.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named DrawBmp.pch and a precompiled types file named StdAfx.obj.
Resource.h
This is the standard header file, which defines new resource IDs.
Microsoft Visual C++ reads and updates this file.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.
If your application uses MFC in a shared DLL, and your application is
in a language other than the operating system's current language, you
will need to copy the corresponding localized resources MFC42XXX.DLL
from the Microsoft Visual C++ CD-ROM onto the system or system32 directory,
and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation.
For example, MFC42DEU.DLL contains resources translated to German.) If you
don't do this, some of the UI elements of your application will remain in the
language of the operating system.
/////////////////////////////////////////////////////////////////////////////
没有合适的资源?快使用搜索试试~ 我知道了~
利用纯C语言解析单色位图文件获取颜色值的代码
共26个文件
cpp:6个
h:6个
bmp:2个
需积分: 0 0 下载量 121 浏览量
2023-10-26
22:51:27
上传
评论
收藏 38KB ZIP 举报
温馨提示
在绘制单色位图时,需要考虑字节对齐问题。字节对齐是指数据存储在内存中时按照多字节对齐的原则进行存放,以提高访问效率。 为了实现这个函数,可以按照以下步骤进行: 计算每行像素数据的实际占用字节数:每个像素占用1个BIT位,即1/8个字节。 计算每行像素数据的补齐字节数:为了满足字节对齐要求,需要计算每行像素数据需要补齐的字节数。 计算每行像素数据所需的总字节数:包括实际占用字节数和补齐字节数。 总字节数 = 实际占用字节数 + 补齐字节数 遍历行数和列数,根据索引计算出当前像素在pData数组中的位置: 像素位置 = 行索引 * 总字节数 根据列索引计算当前像素所在的BIT位在一个BYTE中的偏移量: 偏移量 = 7 - (列索引 % 8) 根据位运算的方式,将当前像素的值写入pData中的相应位置: if(pData[像素位置] & 偏移量); 注意一点:标准的单色位图文件遵循从下至上、从左至右的方式扫描并存储 免积分下载: https://blog.csdn.net/wangningyu/article/details/134066290
资源推荐
资源详情
资源评论
收起资源包目录
DrawBmp8.zip (26个子文件)
DrawBmp8
DrawBmp.cpp 4KB
DrawBmp.opt 49KB
DrawBmpDoc.h 1KB
DrawBmpView.cpp 5KB
DrawBmp.h 1KB
MainFrm.cpp 2KB
DrawBmp.ncb 81KB
res
Toolbar.bmp 1KB
DrawBmp.ico 1KB
DrawBmp.rc2 399B
DrawBmpDoc.ico 1KB
DrawBmp.dsw 537B
Release
adf.bmp 422B
DrawBmp.exe 32KB
Resource.h 495B
DrawBmp.plg 2KB
DrawBmpView.h 2KB
DrawBmp.dsp 5KB
MainFrm.h 2KB
ReadMe.txt 4KB
StdAfx.cpp 209B
DrawBmp.clw 2KB
ShowBitmap8.cpp 3KB
DrawBmp.rc 10KB
DrawBmpDoc.cpp 2KB
StdAfx.h 1KB
共 26 条
- 1
资源评论
汪宁宇
- 粉丝: 752
- 资源: 42
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功