术语 | loadbitmap |
释义 | LoadBitmap 语法: HBITMAP LoadBitmap( __in HINSTANCE hInstance, __in LPCTSTR lpBitmapName ); LoadBitmap函数 该LoadBitmap函数加载的模块的可执行文件中指定的位图资源。此功能已被取代的LoadImage函数。 参数 hInstance [in] 一个句柄,模块的可执行文件的实例包含位图的加载。 lpBitmapName [in] 一个指向 null 结尾的字符串指针,其中包含位图资源的名称被加载。另外,此参数可以包括在低位字资源标识符和高位字为零。该MAKEINTRESOURCE宏可以被用来创建此值。 返回值 如果函数成功,返回值是处理到指定的位图。 如果函数失败,返回值为NULL。 备注 如果位图指向的lpBitmapName参数不存在或没有足够的内存来加载位图,函数失败。 LoadBitmap创建一个兼容位图的显示,不能选择到一台打印机。要加载一个位图,您可以选择一台打印机,电话,并指定LR_CREATEDIBSECTION的LoadImage创建的DIB部分。阿DIB的部分可以选择任何设备。 一个应用程序可以使用LoadBitmap函数访问预定义的位图。为此,应用程序必须HINSTANCE参数设置为NULL和lpBitmapName参数为下列值之一。 位图nameBitmap名称 OBM_BTNCORNERSOBM_OLD_RESTORE OBM_BTSIZEOBM_OLD_RGARROW OBM_CHECKOBM_OLD_UPARROW OBM_CHECKBOXESOBM_OLD_ZOOM OBM_CLOSEOBM_REDUCE OBM_COMBOOBM_REDUCED OBM_DNARROWOBM_RESTORE OBM_DNARROWDOBM_RESTORED OBM_DNARROWIOBM_RGARROW OBM_LFARROWOBM_RGARROWD OBM_LFARROWDOBM_RGARROWI OBM_LFARROWIOBM_SIZE OBM_MNARROWOBM_UPARROW OBM_OLD_CLOSEOBM_UPARROWD OBM_OLD_DNARROWOBM_UPARROWI OBM_OLD_LFARROWOBM_ZOOM OBM_OLD_REDUCEOBM_ZOOMD 位图的名称开头的OBM_OLD代表16位图使用的Windows版本比3.0位版本。 在申请使用OBM_任何常量,不断OEMRESOURCE必须在Windows.h头文件中定义包括在内。 请注意,LoadBitmap用于加载位图已废弃的OEM,只支持向后兼容。新的应用程序应该使用DrawFrameControl提请系统元素。 应用程序必须调用DeleteObject函数删除每个位图处理的LoadBitmap函数返回。 实例 有关示例,请参阅使用菜单实例菜单项的位图。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWinuser.h(头文件:winuser.h) LibraryUser32.lib DLLUser32.dll Unicode和ANSI namesLoadBitmapW(Unicode)和LoadBitmapA(ANSI)的 参见 位图概述 位图功能 CreateBitmap DeleteObject DrawFrameControl LoadCursor LoadIcon 的LoadImage MAKEINTRESOURCE 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年7月11日 ==英文原文==LoadBitmap Function The LoadBitmap function loads the specified bitmap resource from a module's executable file. This function has been superseded by the LoadImage function. Syntax HBITMAP LoadBitmap( __in HINSTANCE hInstance, __in LPCTSTR lpBitmapName ); Parameters hInstance [in] A handle to the instance of the module whose executable file contains the bitmap to be loaded. lpBitmapName [in] A pointer to a null-terminated string that contains the name of the bitmap resource to be loaded. Alternatively, this parameter can consist of the resource identifier in the low-order word and zero in the high-order word. The MAKEINTRESOURCE macro can be used to create this value. Return Value If the function succeeds, the return value is the handle to the specified bitmap. If the function fails, the return value is NULL. Remarks If the bitmap pointed to by the lpBitmapName parameter does not exist or there is insufficient memory to load the bitmap, the function fails. LoadBitmap creates a compatible bitmap of the display, which cannot be selected to a printer. To load a bitmap that you can select to a printer, call LoadImage and specify LR_CREATEDIBSECTION to create a DIB section. A DIB section can be selected to any device. An application can use the LoadBitmap function to access predefined bitmaps. To do so, the application must set the hInstance parameter to NULL and the lpBitmapName parameter to one of the following values. Bitmap nameBitmap name OBM_BTNCORNERSOBM_OLD_RESTORE OBM_BTSIZEOBM_OLD_RGARROW OBM_CHECKOBM_OLD_UPARROW OBM_CHECKBOXESOBM_OLD_ZOOM OBM_CLOSEOBM_REDUCE OBM_COMBOOBM_REDUCED OBM_DNARROWOBM_RESTORE OBM_DNARROWDOBM_RESTORED OBM_DNARROWIOBM_RGARROW OBM_LFARROWOBM_RGARROWD OBM_LFARROWDOBM_RGARROWI OBM_LFARROWIOBM_SIZE OBM_MNARROWOBM_UPARROW OBM_OLD_CLOSEOBM_UPARROWD OBM_OLD_DNARROWOBM_UPARROWI OBM_OLD_LFARROWOBM_ZOOM OBM_OLD_REDUCEOBM_ZOOMD Bitmap names that begin with OBM_OLD represent bitmaps used by 16-bit versions of Windows earlier than 3.0. For an application to use any of the OBM_ constants, the constant OEMRESOURCE must be defined before the Windows.h header file is included. Note that the use of LoadBitmap to load OEM bitmaps is deprecated and is supported only for backward compatibility. New applications should use DrawFrameControl to draw system elements. The application must call the DeleteObject function to delete each bitmap handle returned by the LoadBitmap function. Examples For an example, see Example of Menu-Item Bitmaps in Using Menus . Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWinuser.h (include Windows.h) LibraryUser32.lib DLLUser32.dll Unicode and ANSI namesLoadBitmapW (Unicode) and LoadBitmapA (ANSI) See Also Bitmaps Overview Bitmap Functions CreateBitmap DeleteObject DrawFrameControl LoadCursor LoadIcon LoadImage MAKEINTRESOURCE Send comments about this topic to Microsoft Build date: 7/11/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/dd145033(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。