Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 26 JUL 2010 01:57:14AM Colin Rule wrote:

I am using the GDI, and the DeleteObject function is returning an error when using a Font Handle.

It works fine for Pen and Brush handles, but not for fonts.

The command is:

RetVal=DeleteObjectCSSP(FONT_HDC)

Any ideas why this would return an error.

Note I have declared these with a CSSP suffix, as all DLL calls I use to differentiate them from any standard ones.

The root cause is a system crash due to a memory leak, which I suspect is involved with this command not running properly.

Thanks in advance, Colin


At 26 JUL 2010 10:07PM Colin Rule wrote:

Dont worry, after some investigation and trial and error I have found:

OrigObject=SelectObjectCSSP(HDC,hFontOld)
RetVal=DeleteObjectCSSP(OrigObject)

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/b513ca774146bbe58525776c0020b4ff.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1