Can anyone figure out why LoadBitmap would fail (resource not found)
My resource has:
501 BITMAP "test.bmp"
my source has:
LoadBitmap(hInstance, MAKEINTRESOURCE(501));
Ideas?
(dev-c++)
Can anyone figure out why LoadBitmap would fail (resource not found)
My resource has:
501 BITMAP "test.bmp"
my source has:
LoadBitmap(hInstance, MAKEINTRESOURCE(501));
Ideas?
(dev-c++)
This poster has a similar problem.
Hellow;
Follow examples, load image inside the static control, radio button, button.
Using:Code:/* Function created for Alejandro Ramirez Bastias Talca, Chile */ LRESULT imgbmp(HWND hwnd, int bitmap) { SendMessage ( hwnd,STM_SETIMAGE,IMAGE_BITMAP, (LPARAM)LoadImage ( GetModuleHandle(NULL),MAKEINTRESOURCE(bitmap),IMAGE_BITMAP,0,0,LR_DEFAULTCOLOR ) ); }
hwnd, this handle the control, for example; static WS_BITMAP.Code:: static HWND hImagen; hImagen = GetDlgItem(hwnd,IDC_IMAGE); : case WM_INITDIALOG: imgbmp(hImagen, 501); break;
Bye
Last edited by nostromos; 10-08-2005 at 11:22 PM.
And *this* poster came up with a really good solution:
BTW: Thanks Dante!Originally Posted by Dante Shamest
mw
Last edited by Lionmane; 10-09-2005 at 12:55 AM.
Blucast Corporation
I'm trying to use StretchBlt to make my bitmap cover the entire client area.
How do I find the length/width of my bitmap?
mw
Blucast Corporation
Before stretching?How do I find the length/width of my bitmap?
Try something like
Code:if ( !hbitmap ) return 0 ; BITMAP bm ; GetObject(hbitmap,sizeof(BITMAP),&bm) ; int width = bm.bmWidth ; int height = bm.bmHeight ;
Shame that it's not failing because it's got too many colours then, It's failing because it can't find it, error 1812 to be exact.
Have you added the bitmap as a resource?
I see you've added a reference of it to your resource file, but have you added the actual bitmap?
mw
Blucast Corporation