Re: [Dev-C++] Loading a bitmap and getting its handle ???
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Alfred P. R. <al...@ya...> - 2005-01-10 19:20:36
|
I've loaded them as a resource file, then:
#include <windows.h> ...
int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nFunsterStil) {
...
HICON windowIcon;
...
windowIcon = LoadIcon(hThisInstance, "A"); ...
The resource file (*.rc) declares, in this instance an icon, "A" as:
A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "FileCleanerPro.ico"
If I recall correctly, this will work for BMP files also. BTW: The Win32 API Programmers Reference documents this in a kind of indirect way. I can e-mail it if you don't have the file, but be aware that it is 11.279MB in size.
Hopefully this helps!
A_B...@gm... wrote:
Hi,
I want to use the BitBlt and StrechBlt APIs for drawing images on a window.
Now this APIs needs handles to the window and the bitmap.
I can get the handle of the window, but how do I load a bitmap into memory and get its handle ???
thx, Acki
Alfred P. Reaud
|