summaryrefslogtreecommitdiff
path: root/alf/alflabel.cpp
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2019-01-25 21:45:01 +0100
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2019-01-25 21:45:01 +0100
commit55211af76164fe6c39249c14be47363d35a4db0f (patch)
tree417d9e8805c52d6421798331bea59993e7f1fa1a /alf/alflabel.cpp
parent02d94ecd62e11e28ba87451c392cc6b633bb5c56 (diff)
add memory allocation functions
Diffstat (limited to 'alf/alflabel.cpp')
-rw-r--r--alf/alflabel.cpp4
1 files changed, 2 insertions, 2 deletions
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)