{{tag>category:"OpenInsight 32-Bit" author:"Colin Rule"}} [[https://www.revelation.com/the-works|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]] ==== DeleteObject (OpenInsight 32-Bit) ==== === 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) [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=B513CA774146BBE58525776C0020B4FF|View this thread on the Works forum...]]