Author Topic: DbgBmpFromDC  (Read 535 times)

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 730
  • ObjAsm Developer
    • ObjAsm
DbgBmpFromDC
« on: February 14, 2021, 10:08:52 PM »
Hi
Here's a little tidbit from this week.  :biggrin:

When debugging, I often find myself in the situation that I want to display the contents of the bitmap selected in the device context.
To accomplish this task, I created a simple macro using the well-known DbgOutBitmap procedure:

Code: [Select]
DbgBmpFromDC macro hDC:req, Dest
  if DEBUGGING
    DbgSaveContext FALSE, hDC
    DbgSetDestWnd Dest
    invoke GetCurrentObject, hDC, OBJ_BITMAP
    invoke DbgOutBitmap, xax, ??DbgDstWnd
    DbgLoadContext
  endif
endm

Regards, Biterider