BitmapFromFile
BitmapFromFile proc pszFileName:DWORD
Description
BitmapFromFile returns a bitmap handle from an image file.
An image may be in either .bmp, .gif, .jpg, or .wmf format
Parameters
1. pointer to the pathname of an image file
Return Value
The return value is a handle to a bitmap representation of the file compatible with the screen device context. If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Comments
This function is provided as a convenience to the MASM32 community. It is not composed of highly optimized assembly code, so do not expect blinding speed.
This function uses certain aspects of the Windows API to do the actual conversion from the particular image format. Since the function contains no proprietary code, it may be used without any royalty payments. This may be especially important to those wishing to use .gif files.
BitmapFromResource
BitmapFromResource proc hModule:DWORD, lpName:DWORD
Description
BitmapFromFile returns a bitmap handle from a program resource.
An image may be in either .bmp, .gif, .jpg, or .wmf format
Parameters
1. Handle to the module whose executable file contains the resource.
A value of NULL specifies the module handle associated with the image file that the operating
system used to create the current process.
2. If the high-order word of the lpName parameter is zero, the low-order word specifies the integer
identifier of the name or type of the given resource. Otherwise, those parameters are long
pointers to null-terminated strings. If the first character of the string is a pound sign (#), the
remaining characters represent a decimal number that specifies the integer identifier of the
resource's name or type. For example, the string "#258" represents the integer identifier 258.
An application should reduce the amount of memory required for the resources by referring to
them by integer identifier instead of by name.
Resource file entries should use the identifier “IMAGE” for all image files to be loaded by this
procedure. For backwards capability, bitmap files may have the identifier “BITMAP”
Return Value
The return value is a handle to a bitmap representation of the file compatible with the screen device context. If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Comments
This function is provided as a convenience to the MASM32 community. It is not composed of highly optimized assembly code, so do not expect blinding speed.
This function uses certain aspects of the Windows API to do the actual conversion from the particular image format. Since the function contains no proprietary code, it may be used without any royalty payments. This may be especially important to those wishing to use .gif files.
BitmapFromMemory
BitmapFromMemory proc pHeap:DWORD, dwSize:DWORD
Description
BitmapFromMemory returns a bitmap handle from a program resource.
An image may be in either .bmp, .gif, .jpg, or .wmf format
Parameters
1. Address of a memory structure of an image structure.
2. Size of the memory structure in bytes.
Return Value
The return value is a handle to a bitmap representation of the file compatible with the screen device context. If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Comments
This function is provided as a convenience to the MASM32 community. It is not composed of highly optimized assembly code, so do not expect blinding speed.
This function uses certain aspects of the Windows API to do the actual conversion from the particular image format. Since the function contains no proprietary code, it may be used without any royalty payments. This may be especially important to those wishing to use .gif files.