The MASM Forum

Projects => ObjAsm => Topic started by: Biterider on February 14, 2021, 10:08:52 PM

Title: DbgBmpFromDC
Post by: Biterider 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:

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