Skip to content
Permalink
Browse files

Fixed two handle leaks, found by using Deleaker (https://www.deleaker…

  • Loading branch information...
janwilmans committed Jul 22, 2019
1 parent be0e5f9 commit a2357d2eee8780946420a6baecacc8b2b1d77a15
Showing with 5 additions and 3 deletions.
  1. +1 −1 DebugView++/LogView.h
  2. +4 −2 DebugView++/MainFrame.cpp
@@ -103,7 +103,7 @@ class CMyHeaderCtrl : public CWindowImpl<CMyHeaderCtrl, CHeaderCtrl>
// on windows 10 listview headers are missing depth, we manually draw them to compensate
void Windows10Workaround()
{
CDCHandle dc(GetDC());
CDC dc(GetDC());
RECT rect;
dc.GetClipBox(&rect);

@@ -623,12 +623,14 @@ const wchar_t* RegistryPath = L"Software\\Cobalt Fusion\\DebugView++";

int CMainFrame::LogFontSizeFromPointSize(int fontSize)
{
return -MulDiv(fontSize, GetDeviceCaps(GetDC(), LOGPIXELSY), 72);
CDC dc(GetDC());
return -MulDiv(fontSize, GetDeviceCaps(dc, LOGPIXELSY), 72);
}

int CMainFrame::LogFontSizeToPointSize(int logFontSize)
{
return -MulDiv(logFontSize, 72, GetDeviceCaps(GetDC(), LOGPIXELSY));
CDC dc(GetDC());
return -MulDiv(logFontSize, 72, GetDeviceCaps(dc, LOGPIXELSY));
}

bool CMainFrame::LoadSettings()

0 comments on commit a2357d2

Please sign in to comment.
You can’t perform that action at this time.