diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-04-16 19:25:35 +0200 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-04-16 19:25:35 +0200 |
| commit | 8b5755851611574fd4010d9fa4e1046b78a501b9 (patch) | |
| tree | 84817c8bea211c099d72967470a1f054ece707c6 /alf/alflabel.cpp | |
| parent | 536ea04c34ba761d7031eeabb6d50adab0f0f2bd (diff) | |
make it build with -Wconversion
Diffstat (limited to 'alf/alflabel.cpp')
| -rw-r--r-- | alf/alflabel.cpp | 8 |
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); |
