diff options
Diffstat (limited to 'alf/alfbutton.cpp')
| -rw-r--r-- | alf/alfbutton.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alf/alfbutton.cpp b/alf/alfbutton.cpp index b0458b2..5f7a638 100644 --- a/alf/alfbutton.cpp +++ b/alf/alfbutton.cpp @@ -23,12 +23,12 @@ ALF__ButtonSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT RECT r = { 0, 0, 0x7FFFFFFF, 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(hdc, textbuf, -1, &r, format); - HeapFree(GetProcessHeap(), 0, textbuf); + ALF_Free(textbuf); int xpadding = ALF_Compat_GetSystemMetricsForDpi(SM_CXEDGE, ALF_CentipointsToPixels(GetParent(hwnd), 7200)) * 2 + 6; |
