News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

DbgBmpFromDC

Started by Biterider, February 14, 2021, 10:08:52 PM

Previous topic - Next topic

Biterider

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