开发者

Is there a way to distinguish the device context type?

I am Hooking the GDI API ExtTextOut

BOOL ExtTextOut(
  __in  HDC hdc,
  __in 开发者_StackOverflow int X,
  __in  int Y,
  __in  UINT fuOptions,
  __in  const RECT *lprc,
  __in  LPCTSTR lpString,
  __in  UINT cbCount,
  __in  const INT *lpDx
);

My question: Is there a good solid way to distinguish the device context type (HDC). In particular to know if it is a memory device context or a display device context.

Thanks for your efforts, Momico.


off course there is, you should put in your custom function return GetObjectType( dc ) == OBJ_MEMDC ;

best

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜