Pelles C forum

C language => Windows questions => Topic started by: grom-it on May 26, 2008, 06:49:05 PM

Title: BM_SETIMAGE
Post by: grom-it on May 26, 2008, 06:49:05 PM

:'(
Running this on a pocket pc but it should work and it doesnt.

Compiles fine but no bitmap on button.....
HBITMAP hbmp;
hbmp = LoadBitmap(GetModuleHandle(NULL),MAKEINTRESOURCE(IDR_DELARROWBMP));
SendMessage(GetDlgItem(hwnd, IDB_DEL)),BM_SETIMAGE,(WPARAM)IMAGE_B ITMAP,(LPARAM)hbmp);

I have the bitmap in question in the rs file so "Should i be using MAKEINTRESOURCE"??

Running the above code in WM_CREATE
results in no bitmap placed on button
The Button already has the BS_BITMAP SETTING
i seem to be reading that this cannot be used in windows XP
Compiled on pelles under XP
Running under WINDOWS MOBILE 5  on a pocket pc
But after a lot of trying i fail to find an alternative method an would dearly like to place an arrow on my button and not just "<" as it is at present.

any info appreciated
BTIA
gromit.
Title: Re: BM_SETIMAGE
Post by: TimoVJL on May 26, 2008, 08:44:32 PM
Here is test dialog with bitmap button for WinXP