<MFC>请问:LoadOEMBitmap中的参数含义

TSelf 2010-07-18 03:54:55
BOOL LoadOEMBitmap( UINT nIDBitmap );
OBM_BTNCORNERS OBM_OLD_RESTORE
OBM_BTSIZE OBM_OLD_RGARROW
OBM_CHECK OBM_OLD_UPARROW
OBM_CHECKBOXES OBM_OLD_ZOOM
OBM_CLOSE OBM_REDUCE
OBM_COMBO OBM_REDUCED
OBM_DNARROW OBM_RESTORE
OBM_DNARROWD OBM_RESTORED
OBM_DNARROWI OBM_RGARROW
OBM_LFARROW OBM_RGARROWD
OBM_LFARROWD OBM_RGARROWI
OBM_LFARROWI OBM_SIZE
OBM_MNARROW OBM_UPARROW
OBM_OLD_CLOSE OBM_UPARROWD
OBM_OLD_DNARROW OBM_UPARROWI
OBM_OLD_LFARROW OBM_ZOOM
OBM_OLD_REDUCE OBM_ZOOMD
以上到底是什么意思啊?
...全文
71 点赞 收藏 2
写回复
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
sumeng 2012-02-17
其实就是windows中预定义好的位图,可将下列代码复制带MFC单文档函数ondraw函数中运行看绘制结果。
另外,也可直接从我的资源中下载。
    int width=0,height=0; 
/* #define OBM_OLD_CLOSE 32767
#define OBM_SIZE 32766
#define OBM_OLD_UPARROW 32765
#define OBM_OLD_DNARROW 32764
#define OBM_OLD_RGARROW 32763
#define OBM_OLD_LFARROW 32762
#define OBM_BTSIZE 32761
#define OBM_CHECK 32760
#define OBM_CHECKBOXES 32759
#define OBM_BTNCORNERS 32758
#define OBM_OLD_REDUCE 32757
#define OBM_OLD_ZOOM 32756
#define OBM_OLD_RESTORE 32755
#define OBM_CLOSE 32754
#define OBM_UPARROW 32753
#define OBM_DNARROW 32752
#define OBM_RGARROW 32751
#define OBM_LFARROW 32750
#define OBM_REDUCE 32749
#define OBM_ZOOM 32748
#define OBM_RESTORE 32747
#define OBM_REDUCED 32746
#define OBM_ZOOMD 32745
#define OBM_RESTORED 32744
#define OBM_UPARROWD 32743
#define OBM_DNARROWD 32742
#define OBM_RGARROWD 32741
#define OBM_LFARROWD 32740
#define OBM_MNARROW 32739
#define OBM_COMBO 32738
#define OBM_UPARROWI 32737
#define OBM_DNARROWI 32736
#define OBM_RGARROWI 32735
#define OBM_LFARROWI 32734*/


for (int i=0;i<34;i++)
{
CBitmap bitmap;
CDC compatibledc;
if(!bitmap.LoadOEMBitmap(32734+i))
{
continue;//本函数用于加载一个Windows预定义的位图。以OBM_OLD开头的位图名表示它们是在Windows3.0之前
//的版本采用的。使用不是以OBM_OLD开头的常量,需要在包括头文件WINDOW.H之前定义常量OEMRESOURCE。
//此处跳过OBM_OLD开头的常量
}
compatibledc.CreateCompatibleDC(pDC);
compatibledc.SelectObject(&bitmap);
BITMAP bmp;
bitmap.GetBitmap(&bmp);
pDC->StretchBlt(width,height,bmp.bmWidth,bmp.bmHeight,&compatibledc,0,0,bmp.bmWidth,bmp.bmHeight,SRCCOPY);
width+=bmp.bmWidth+10;
if (width>1000)
{
width=0;
height+=bmp.bmHeight+10;
}
}
回复
发动态
发帖子
VC/MFC
创建于2007-09-28

1.5w+

社区成员

VC/MFC相关问题讨论
申请成为版主
社区公告
暂无公告