How to Send an HBITMAP to Windows API Function Calls from VBID: Q71260
|
Several Windows API functions require the HBITMAP data type. Visual Basic for Windows does not have a HBITMAP data type. This article explains how to send the equivalent Visual Basic for Windows HBITMAP handle of a picture control to a Windows API function call.
This information is also included with the Microsoft Knowledge Base Help
file provided with the Professional Edition of Microsoft Visual Basic
version 3.0 for Windows.
The HBITMAP data type represents a 16-bit index to GDIs physical
drawing object. Several Windows API routines need the HBITMAP data
type as an argument. Sending the [picture-control].Picture as an
argument is the equivalent in Visual Basic for Windows.
The code sample below demonstrates how to send HBITMAP to the Windows
API function ModifyMenu:
' Enter the following Declare statement as one, single line:
Declare Function SetMenuItemBitMaps% Lib "user" (ByVal hMenu%, ByVal nPos%,
ByVal wFlag%, ByVal BitmapUnChecked%, ByVal hBitmapChecked%)
Additional query words: 2.00 3.00
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: June 24, 1999