> MemHandle h = DmGetResource(bitmapRsc, BmpId);
> BitmapPtr bitmapP = (BitmapPtr)MemHandleLock(h);
>
> BitmapTypeV3 *bmpV3P = BmpCreateBitmapV3(bitmapP,
> kDensityDouble, BmpGetBits(bitmapP), NULL);
>
> WinDrawBitmap((BitmapPtr)bmpV3P, x, y);

i use hi-density stuff all the time, and, really - i dont call
WinDrawBitmap write your bitmap to an offscreen window (which, is
hi-density) and then copy it to the screen using WinCopyRectangle()

this is what we do in lemmings for example:

---
  if (DeviceSupportsVersion(romVersion3_5))
  {
    globals.drawBitmap =
      BmpCreate(WIDTH, HEIGHT, globals.scrDepth, NULL, &err);
    if (err == errNone)
    {
      // high density device
      if (globals.palmHD.device)
      {
        globals.drawBitmapV3 =
          BmpCreateBitmapV3(globals.drawBitmap,
                            globals.palmHD.density,
                            BmpGetBits(globals.drawBitmap), NULL);
        err = (globals.drawBitmapV3 == NULL);
        if (err == errNone)
          globals.drawWindow =
            WinCreateBitmapWindow((BitmapType *)globals.drawBitmapV3, &err);
      }
      else
        globals.drawWindow =
          WinCreateBitmapWindow(globals.drawBitmap, &err);
    }
  }
  else
    globals.drawWindow =
      WinCreateOffscreenWindow(WIDTH, HEIGHT, screenFormat, &err);
  err |= (Boolean)(globals.drawWindow == NULL);

---

that will give you a window. which, you can then copy using
WinCopyRectangle() i know this technique works on *ALL* devices,
including 68k palm, sony hires, handera and the palm hires devices.

---
Aaron Ardiri                           [EMAIL PROTECTED]
CEO - CTO                                              +46 70 656 1143
Mobile Wizardry                         http://www.mobilewizardry.com/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to