各位仁兄,想问问关于loadbitmap的问题

popkiler 2003-09-16 05:44:29
HBITMAP hbmCheck = LoadBitmap((HINSTANCE) NULL,(LPTSTR)OBM_CHECK);
HBITMAP hbmRadio = LoadBitmap((HINSTANCE) NULL,(LPTSTR)OBM_BTNCORNERS);

想问问为什么我假如这句时,为什么会出错阿?

E:\RECYCLER\RECECLY\复件 MYQQ___完美版\注释过的完全成功的作品\rcm.cpp(474) : error C2065: 'OBM_CHECK' : undeclared identifier
E:\RECYCLER\RECECLY\复件 MYQQ___完美版\注释过的完全成功的作品\rcm.cpp(475) : error C2065: 'OBM_BTNCORNERS' : undeclared identifier

我知道这必须头文件是:#include <Winuser.h>,#include <Windows.h>
lib文件是:User32.lib
可是还是出错阿

...全文
260 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
popkiler 2003-09-18
  • 打赏
  • 举报
回复
Loads a predefined bitmap used by Windows.

BOOL LoadOEMBitmap(
UINT nIDBitmap
);
Parameters
nIDBitmap
ID number of the predefined Windows bitmap. The possible values are listed below from WINDOWS.H: 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_UPARROW
OBM_OLD_LFARROW OBM_ZOOM
OBM_OLD_REDUCE OBM_ZOOMD

Return Value
Nonzero if successful; otherwise 0.

Remarks
Bitmap names that begin with OBM_OLD represent bitmaps used by Windows versions prior to 3.0.

Note that the constant OEMRESOURCE must be defined before including WINDOWS.H in order to use any of the OBM_ constants.

See Also
CBitmap Overview | Class Members | Hierarchy Chart | CBitmap::LoadBitmap | LoadBitmap

popkiler 2003-09-18
  • 打赏
  • 举报
回复
Q67709


--------------------------------------------------------------------------------
The information in this article applies to:

Microsoft Windows Software Development Kit (SDK) for Windows

--------------------------------------------------------------------------------


SUMMARY
All Windows version 3.0 and 3.1 display drivers are required to contain certain bitmaps. These bitmaps are used to paint various windows, controls, and menus. Handles to these bitmaps can be retrieved with the LoadBitmap() function. Below is an explanation of the OBM values listed in the Windows include file WINDOWS.H.

These values are parsed by the C Compiler only if OEMRESOURCE is defined prior to including WINDOWS.H.



MORE INFORMATION
The following file is available for download from the Microsoft Download Center. Click the file name below to download the file:


Sysbit.exe
For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services
Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.



Because Windows buttons have two states, normal and depressed (the mouse pointer is over the icon and the mouse button is down), the first seven shapes (bitmaps) have two forms, the normal image and the depressed image. Both images are used to create the illusion of three dimensions on the screen when a button is pressed. The names of depressed images end with the letter "D"; the other images do not.

The last eleven bitmaps are no longer used by Windows, but must be supplied for compatibility with applications that expect them to be available.


Windows 3.1 Bitmaps


The following four bitmaps are new for Windows 3.1:



NOTE: The SYSBIT sample does not display these bitmaps, but they are
illustrated in the documentation (as are the rest of the bitmaps listed
below) for the LoadBitmap() function in the Windows SDK.




Resource Name Purpose
---------------------------------------------------------------------
OBM_DNARROWI A disabled down-pointing arrow for scroll bars.
OBM_LFARROWI A disabled left-pointing arrow for scroll bars.
OBM_RGARROWI A disabled right-pointing arrow for scroll bars.
OBM_UPARROWI A disabled up-pointing arrow for scroll bars.
Windows 3.00 Bitmaps

Resource Name Purpose
------------- ------- OBM_RESTORE Images used as the restore button on the title
OBM_RESTORED bar. This is the button with both an up and
down arrow which is only shown when a window is
maximized. OBM_REDUCE Images used as the minimize button on the title
OBM_REDUCED bar. OBM_ZOOM Images used as the maximize button on the title
OBM_ZOOMD bar. OBM_RGARROW A right-pointing arrow for scroll bars.
OBM_RGARROWD OBM_LFARROW A left-pointing arrow for scroll bars.
OBM_LFARROWD OBM_UPARROW An up-pointing arrow for scroll bars.
OBM_UPARROWD OBM_DNARROW A down-pointing arrow for scroll bars.
OBM_DNARROWD OBM_CLOSE A double-wide image that contains system menu box shapes for both main windows and MDI child
windows. OBM_CHECK A check mark used to check menu items. OBM_CHECKBOXES Ten images that are used to show different states of check boxes and radio buttons. The
images are organized in three rows of four
columns: Row 1
----- Column 1: Unchecked check box when the mouse is not pressed
over it. Column 2: Checked check box when the mouse is not pressed over
it. Column 3: Unchecked check box when the mouse is pressed over
it. Column 4: Checked check box when the mouse is pressed over it. Row 2
----- Column 1: Unchecked radio button when the mouse is not pressed
over it. Column 2: Checked radio button when the mouse is not pressed
over it. Column 3: Unchecked radio button when the mouse is pressed over
it. Column 4: Checked radio button when the mouse is pressed over
it. Row 3:
----- Column 1: Unused Column 2: Grayed check box when the mouse is not pressed over
it. Column 3: Unused Column 4: Grayed check box when the mouse is pressed over it. OBM_COMBO An arrow used for the push button in combo
boxes. OBM_MNARROW An arrow used to designate cascaded menu items.
Windows 1.x/2.x Bitmaps

Resource Name Purpose
------------- ------- OBM_SIZE A size box formerly used on tiled windows. OBM_BTSIZE A size box formerly used at the intersection of
vertical and horizontal scroll bars. OBM_OLD_RESTORE Image used for the Windows 2.x restore button
on a windows title bar. OBM_OLD_REDUCE Image used for the Windows 2.x minimize button
on a windows title bar. OBM_OLD_ZOOM Image used for the Windows 2.x maximize button
on a windows title bar. OBM_OLD_RGARROW A right-arrow bitmap used for Windows 2.x
scroll bars. OBM_OLD_LFARROW A left-arrow bitmap used for Windows 2.x scroll
bars. OBM_OLD_UPARROW An up-arrow bitmap used for Windows 2.x scroll
bars. OBM_OLD_DNARROW A down-arrow bitmap used for Windows 2.x scroll
bars. OBM_OLD_CLOSE The system menu bitmaps used for Windows 2.x. OBM_BTNCORNERS Small circles that Windows 2.x used to draw
rounded corners on button controls.

Additional query words: softlib SYSBIT

Keywords : kbfile kbsample kb16bitonly kbOSWin310 kbDSupport kbOSWin300 kbSDKWin16
Issue type : kbinfo
Technology :
xushinhwa2003 2003-09-17
  • 打赏
  • 举报
回复
有时路径太长就会出错.
lygfqy 2003-09-17
  • 打赏
  • 举报
回复
其实不过就是定义了一个整数嘛,实在不行用它本身定义的值代替其实也是可以的
试验了一下,应该是系统本身的图象,不过好像要#define 某些东西
具体因为WINUSER.H太长未详细研究了
fairyprince 2003-09-17
  • 打赏
  • 举报
回复
当然出错了
LoadBitmap((HINSTANCE) NULL,(LPTSTR)OBM_CHECK);

当第一个参数为空时,第二个参数代表文件名(是位图的)
bluebohe 2003-09-17
  • 打赏
  • 举报
回复
我也借地问一个小小的问题,CBitmap的成员函数
BOOL LoadBitmap( LPCTSTR lpszResourceName );
LPCTSTR lpszResourceName 到底是什么东西?BMP文件?还是可执行文件?还是资源的“别名”?我觉得是资源的“别名”可是没啥根据
MAKEINTRESOURCE是干什么的?

woaini5994 2003-09-17
  • 打赏
  • 举报
回复
CBitmap bp;
bp.LoadBitmap(ID..);
HBITMAP bm;
bp.GetBitemap(bm);
hbmCheck =bm;
我觉得是应该这样
popkiler 2003-09-16
  • 打赏
  • 举报
回复
'OBM_CHECK' ,'OBM_BTNCORNERS' 是否是属于系统自己的阿。
因为我在源程序上更本没有看到
littleboy73 2003-09-16
  • 打赏
  • 举报
回复
同意何志丹的意见
  • 打赏
  • 举报
回复
CBitmap bp;
bp.LoadBitmap(ID..);
HBITMAP hbmCheck = bp;
源码链接: https://pan.quark.cn/s/0f7c75cb3aad ### MIPI Video Mode 与 Command Mode 的差异 #### 一、引言 MIPI (Mobile Industry Processor Interface) 是一种用于连接移动设备中处理器及其外围设备的标准化接口。MIPI 接口支持多种协议,其中包含 DSI (Display Serial Interface) 和 DCS (Display Control Interface) 等协议。在 MIPI 接口的应用中,主要涉及两种工作模式:Video Mode(视频模式)和 Command Mode(命令模式)。本文旨在系统性地阐述这两种模式的工作机制、特性以及实际应用环境。 #### 二、LCD RAM 概念说明 在进一步探讨 MIPI 的两种模式之前,有必要对文中提及的“LCD RAM”概念进行明确。实际上,“LCD RAM”并非一个通用术语,而是本文作者用来描述 LCD 控制器中用于存储显示数据的内存区域。LCD(Liquid Crystal Display,液晶显示屏)通常配备一个控制 IC(Integrated Circuit,集成电路),该控制 IC 可能内置 RAM 以缓存显示数据。 #### 三、MIPI Video Mode(视频模式) **定义:** - 视频模式是一种类似于传统 RGB 接口的工作模式,它要求主机持续不断地向显示器传输刷新数据。 - 在这种模式下,数据和控制信号以报文的形式通过 MIPI 总线进行传输。 - 显示器本身无需配备帧缓冲器,因为主机会周期性地刷新屏幕。 **特点:** 1. **实时性高:** 主机需要不...
源码下载地址: https://pan.quark.cn/s/a4b39357ea24 在电磁模拟技术中,CST(Computer Simulation Technology)是一种被广泛采纳的软件工具,它主要用于电磁场、微波、天线以及射频系统的设计工作。本资料将详细分析CST软件中离散端口的具体配置方法,这些方法对于提升仿真结果的精确度和专业水准具有决定性作用。离散端口在CST软件中扮演着模拟信号输入或输出的重要角色,它们构成了仿真模型不可或缺的部分。在配置离散端口时,一个核心的原则是保证端口的方向与网格线保持一致,这是因为这样做能够有效降低计算过程中产生的误差,并确保仿真数据的有效性。如果未能遵循这一指导原则,可能会引发未知的计算问题,进而导致仿真结果失去可靠性。 在CST软件中配置离散端口,通常需要借助“Pick Points”这一功能。通过选择“Pick Edge Center”选项,端口将被设定在模型边缘的中心位置上。然而,这种做法并不总是能够确保端口与网格线保持平行。在某些特定情形下,模型的几何构造可能不允许直接选取一个与网格线平行的边作为端口的安装位置。 为了克服这一挑战,可以采用多种不同的策略。如果模型本身已经包含一条与馈电口平行的边,那么可以直接利用这条边来建立端口,此时CST软件会自动调整端口使其与网格线对齐。另一种可选的方法是,当模型不具备现成的平行边时,用户可以手动构建一个几何结构,比如一个立方体,并使其边缘与馈电口平行。通过这种方式,新建立的几何结构的边缘就可以作为端口的位置,从而确保端口与网格线的平行关系。 在实施上述操作时,必须关注端口尺寸的合理性和物理意义的一致性。端口的尺寸应当依据实际天线馈电部分的尺寸进行适当调整,过大的端口或...
代码下载链接: https://pan.quark.cn/s/a4b39357ea24 【使用TensorFlow进行图像识别】 图像识别作为计算机视觉领域的关键任务之一,其核心在于通过算法解析和理解图像所包含的信息。在此资源中,我们将集中探讨如何借助功能强大的深度学习框架TensorFlow来执行手写数字识别。手写数字识别构成了众多实际应用的基础,例如自动支票处理、光学字符识别(OCR)等场景。 TensorFlow是由Google创建的一个开源库,它主要用于数值运算和机器学习,尤其在深度学习方面表现卓越。其核心优势在于可以构建并训练复杂的神经网络架构,并且在多种硬件环境中实现高效执行,涵盖CPU和GPU平台。 在此实践项目中,我们将运用TensorFlow来构建一个卷积神经网络(CNN)模型,这种架构是处理图像数据的理选择。CNNs通过模仿人脑视觉皮层的运作机制,能够自主地提取图像中的关键特征,进而达成识别目标。在手写数字识别的特定情境下,这些特征可能涉及笔画的几何形态、走向以及相互间的连接模式。 对于CNN的基础结构,我们需要具备相应的认知,其通常由卷积层、池化层、全连接层以及激活函数等部分组成。卷积层借助滤波器(亦称卷积核)对图像进行扫描,以捕捉局部特征;池化层则用于降低数据维度,同时保留核心信息;全连接层将特征向量映射至各类别的概率分布;而激活函数如ReLU则通过引入非线性元素,使模型能够学习更为复杂的模式。 在此案例中,建议采用MNIST数据集,这是一个广泛用于手写数字识别的标准测试集。该数据集包含60,000个训练样本和10,000个测试样本,每个样本均为28x28像素的灰度图像,代表0到9这十个数字中的某一个。为了训练模型,必须首先加载数据,并...

16,550

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Creator Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧