From 55211af76164fe6c39249c14be47363d35a4db0f Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Fri, 25 Jan 2019 21:45:01 +0100 Subject: add memory allocation functions --- alf/alflabel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alf/alflabel.cpp') diff --git a/alf/alflabel.cpp b/alf/alflabel.cpp index eb27fb1..0a18a54 100644 --- a/alf/alflabel.cpp +++ b/alf/alflabel.cpp @@ -39,12 +39,12 @@ ALF__LabelSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_ RECT r = { 0, 0, 100, 100 }; int textlen = GetWindowTextLength(hwnd); - TCHAR *textbuf = (TCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY|HEAP_GENERATE_EXCEPTIONS, (textlen + 1)*sizeof(TCHAR)); + TCHAR *textbuf = ALF_New(TCHAR, textlen + 1); GetWindowText(hwnd, textbuf, textlen+1); DrawText(hdcLabel, textbuf, -1, &r, format); - HeapFree(GetProcessHeap(), 0, textbuf); + ALF_Free(textbuf); SIZE *pSize = (SIZE*)(void*)lParam; if (pSize->cx == 0) -- cgit v1.2.3