I'm not trying to make a game, but I want to learn about loading bitmaps onto windows in visual c++. Does anyone know of a place to learn more about this? Thanks for any help
I'm not trying to make a game, but I want to learn about loading bitmaps onto windows in visual c++. Does anyone know of a place to learn more about this? Thanks for any help
Well, I got some code going:
hehe, not much, eh? I have a RECT var which I described the top/bottom/left/right properties to and I'm trying to assign it to the first argument of BitBlt(). How do I make the MyRect thing into a drawing area? I'm confused with BeginPaint(). Does anyone have any ideas?Code:hBitmap=(HBITMAP)LoadBitmap(myInstance,MAKEINTRESOURCE(IDD_BMPMAP)); BitBlt(
Well, let me update that code:
It displays nothing. What am I doing wrong? The bitmap is 64x320. Any ideas?Code:hBitmap=(HBITMAP)LoadBitmap(myInstance,MAKEINTRESOURCE(IDD_BMPMAP)); BitBlt(hDC,50,50,64,320,(HDC)hBitmap,0,0,SRCCOPY);
try making another dc using CreateCompatibleDC() and load your bitmap into it. then bitblt the compatible dc into hdc.
Try a search. I have posted all the code you need previously and do not want to do so again.
PS CreateCompatibleBitmap() needs a HDC for the second to be compatible with. But you will find this in a search.
Use GetObject() and a BITMAP struc to find the size of the image on the fly.
You will need a paint function to see anything.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill