summaryrefslogtreecommitdiff
path: root/alf/alflabel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alflabel.cpp')
-rw-r--r--alf/alflabel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/alf/alflabel.cpp b/alf/alflabel.cpp
index b0abc4b..59c92fa 100644
--- a/alf/alflabel.cpp
+++ b/alf/alflabel.cpp
@@ -15,7 +15,7 @@ ALF__LabelTopPadding(HWND hwnd)
// some pixels on top to align with the edit control
// see also: alfedit.cpp
return ALF_Compat_GetSystemMetricsForDpi(
- SM_CYEDGE, ALF_CentipointsToPixels(GetParent(hwnd), 7200))
+ SM_CYEDGE, (UINT)ALF_CentipointsToPixels(GetParent(hwnd), 7200))
+ (!ALF_Compat_IsMinWindowsVersion(4, 0) ? 2 : 1) /* internal padding in edit control */;
}
@@ -25,7 +25,7 @@ ALF__LabelLeftPadding(HWND hwnd, HDC hdc)
// some pixels on the left to align with the edit control
// see also: alfedit.cpp
int p = ALF_Compat_GetSystemMetricsForDpi(
- SM_CXEDGE, ALF_CentipointsToPixels(GetParent(hwnd), 7200));
+ SM_CXEDGE, (UINT)ALF_CentipointsToPixels(GetParent(hwnd), 7200));
p += 1;
@@ -62,7 +62,7 @@ ALF__LabelWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return DefWindowProc(hwnd, uMsg, wParam, lParam);
if (uMsg == ALF_WM_LBL_GETSTYLE) {
- return priv->style;
+ return (LRESULT)priv->style;
} else if (uMsg == ALF_WM_LBL_SETSTYLE) {
priv->style = (DWORD)lParam;
InvalidateRect(hwnd, NULL, TRUE);
@@ -181,7 +181,7 @@ ALF__LabelWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
RECT r = { 0, 0, 100, 100 };
- TCHAR *textbuf = ALF_New(TCHAR, textlen + 1);
+ TCHAR *textbuf = ALF_New(TCHAR, (SIZE_T)textlen + 1);
GetWindowText(hwnd, textbuf, textlen+1);
DrawText(hdcLabel, textbuf, -1, &r, format);