Re: Dynamically sizing Display Fonts

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I'm not sure if you are saying that you have a memory leak above. If so -
it could be explained by the following:


hOldFont = SelectObject(hDc,hFont); // <- Save previous font's handle

// other code here

SelectObject( hDc, hOldFont ); // restore original font before deleting
your font next line
DeleteObject(hFont);

What I'm getting at - and I'm not sure by the code you posted - are you
saving the previous font's handle from the DC and then restoring it as
above?

Best Regards,

Rene Pilon


.



Relevant Pages

  • Re: DirectShow heap memory leak
    ... Yes, that's what I'm saying. ... >>that the CoCreateInstance() call usually takes. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: DirectShow heap memory leak
    ... Yes, that's what I'm saying. ... >>that the CoCreateInstance() call usually takes. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Memory leaks
    ... dialog saying it can't find the file and allow you to browse to the ... correct path. ... In other words you had a memory leak! ... Les ...
    (microsoft.public.vc.mfc)