Dear Pete,

BM2 is not a BitmapPtr but an resouce-ID. 
You should us bitmapPtr. The easiest way to do it is shown in the
following function.


static void DrawBitmap(Int x, Int y, Int id)
{
        VoidHand h;
        BitmapPtr p;

        h = DmGet1Resource('Tbmp', id);
        if (h != NULL)
                {
                p = (BitmapPtr) MemHandleLock(h);
                WinDrawBitmap(p, x, y);
                MemHandleUnlock(h);
                }
        DmReleaseResource(h);
}

Best Regards,

>Ernst.
>
>
>-----Original Message-----
>From:  Pete Lancashire [SMTP:[EMAIL PROTECTED]]
>Sent:  woensdag 2 juni 1999 23:01
>To:    [EMAIL PROTECTED]
>File is a 32x32x2 file in windows bitmap (.bmp) format
>The .bin file created by Pilrc is:
>---------------------------------------------------------------
>0000000 00 20 00 20 00 04 00 00 00 00 00 00 00 00 00 00
>0000020 ff ff ff ff 80 00 00 01 80 00 00 01 80 00 00 01
>0000040 80 00 00 01 80 00 00 01 80 00 00 01 80 00 00 01
>*
>0000200 80 00 00 01 80 00 00 01 80 00 00 01 ff ff ff ff
>0000220
>---------------------------------------------------------------
>
>In my .rcp file I have
>--------------------------------------------
>BITMAP ID BM2 "32x32y.bmp"
>--------------------------------------------
>
>In the .h file I have
>--------------------------------------------
>#define BM2                              1303
>--------------------------------------------
>
>In my .c I have
>-------------------------------------------------
>    case RaceStatusButton:
>      WinDrawBitmap ((BitmapPtr) BM2, 10,40);
>      // FrmAlert (RaceStatsAlert);
>      break;
>------------------------------------------------
>
>Hitting the button displays nothing ...
>(the old code to pop up an alert works)
>
>Program now will force the PP to be reset ..
>
>Please .. really need some help on this simple problem.
>
>Thanks,
>
>-pete
>

Reply via email to