diff options
Diffstat (limited to 'c')
-rw-r--r-- | c/common.c | 4 | ||||
-rw-r--r-- | c/main.c | 1 |
2 files changed, 4 insertions, 1 deletions
@@ -15,8 +15,10 @@ int Dpi(int i) extern HWND HWnd; IDPI = 96; hModule = LoadLibrary(TEXT("User32.dll")); - if (hModule && (GetDpiForWindow = GetProcAddress(hModule, "GetDpiForWindow"))) + if (hModule && (GetDpiForWindow = GetProcAddress(hModule, "GetDpiForWindow"))) { IDPI = GetDpiForWindow(HWnd); + FreeLibrary(hModule); + } } return MulDiv(i, IDPI, 96); @@ -281,6 +281,7 @@ SetupFonts() SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &m, 0); HfNormal = CreateFontIndirect(&m.lfMessageFont); + FreeLibrary(hModule); } else HfNormal = GetStockObject(DEFAULT_GUI_FONT); |