summaryrefslogtreecommitdiff
path: root/tipper/popwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tipper/popwin.cpp')
-rw-r--r--tipper/popwin.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tipper/popwin.cpp b/tipper/popwin.cpp
index 5d19bde..e1a6486 100644
--- a/tipper/popwin.cpp
+++ b/tipper/popwin.cpp
@@ -140,7 +140,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
//MessageBox(0, swzText, _T("tip"), MB_OK);
TCHAR buff[2048], *swzText = pwd->clcit.text;
- int buff_pos, i = 0, size = _tcslen(pwd->clcit.text);
+ int buff_pos, i = 0, size = (int)_tcslen(pwd->clcit.text);
bool top_message = false;
while(i < size && swzText[i] != _T('<')) {
@@ -477,7 +477,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
SetTextColor(ps.hdc, options.title_col);
tr.top = r.top + options.padding; tr.bottom = tr.top + pwd->tb_height - options.padding;
- DrawText(ps.hdc, pwd->swzTitle, _tcslen(pwd->swzTitle), &tr, DT_VCENTER | DT_LEFT | DT_END_ELLIPSIS | DT_SINGLELINE | DT_NOPREFIX);
+ DrawText(ps.hdc, pwd->swzTitle, (int)_tcslen(pwd->swzTitle), &tr, DT_VCENTER | DT_LEFT | DT_END_ELLIPSIS | DT_SINGLELINE | DT_NOPREFIX);
}
// values
@@ -524,7 +524,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
tr.top += options.text_padding;
tr.bottom = tr.top + row_height;
SetTextColor(ps.hdc, options.label_col);
- DrawText(ps.hdc, pwd->rows[i].swzLabel, _tcslen(pwd->rows[i].swzLabel), &tr, options.label_valign | ((options.label_halign == DT_RIGHT && !pwd->rows[i].value_newline) ? DT_RIGHT : DT_LEFT) | DT_END_ELLIPSIS | DT_SINGLELINE | DT_NOPREFIX);
+ DrawText(ps.hdc, pwd->rows[i].swzLabel, (int)_tcslen(pwd->rows[i].swzLabel), &tr, options.label_valign | ((options.label_halign == DT_RIGHT && !pwd->rows[i].value_newline) ? DT_RIGHT : DT_LEFT) | DT_END_ELLIPSIS | DT_SINGLELINE | DT_NOPREFIX);
if(pwd->rows[i].value_newline)
tr.top = tr.bottom;
} else
@@ -551,7 +551,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if(pwd->rows[i].value_height) {
if(pwd->rows[i].value_newline || !pwd->rows[i].label_height) tr.top += options.text_padding;
tr.bottom = tr.top + row_height;
- DrawText(ps.hdc, pwd->rows[i].swzValue, _tcslen(pwd->rows[i].swzValue), &tr, options.value_valign | options.value_halign | DT_WORDBREAK | DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | DT_NOPREFIX);
+ DrawText(ps.hdc, pwd->rows[i].swzValue, (int)_tcslen(pwd->rows[i].swzValue), &tr, options.value_valign | options.value_halign | DT_WORDBREAK | DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | DT_NOPREFIX);
}
}
@@ -714,7 +714,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
// titlebar height
if(!pwd->text_tip && pwd->swzTitle && options.title_layout != PTL_NOTITLE) {
if(hFontTitle) SelectObject(hdc, (HGDIOBJ)hFontTitle);
- GetTextExtentPoint32(hdc, pwd->swzTitle, _tcslen(pwd->swzTitle), &size);
+ GetTextExtentPoint32(hdc, pwd->swzTitle, (int)_tcslen(pwd->swzTitle), &size);
width += options.padding + size.cx;
if(options.title_layout != PTL_NOICON) {
pwd->tb_height = options.padding + max(size.cy, 16);
@@ -760,7 +760,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
for(i = 0; i < pwd->row_count; i++) {
if(pwd->rows[i].swzLabel && pwd->rows[i].value_newline == false) {
if(hFontLabels) SelectObject(hdc, (HGDIOBJ)hFontLabels);
- GetTextExtentPoint32(hdc, pwd->rows[i].swzLabel, _tcslen(pwd->rows[i].swzLabel), &size);
+ GetTextExtentPoint32(hdc, pwd->rows[i].swzLabel, (int)_tcslen(pwd->rows[i].swzLabel), &size);
if(size.cx > pwd->label_width)
pwd->label_width = size.cx;
}
@@ -769,7 +769,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
for(i = 0; i < pwd->row_count; i++) {
if(hFontLabels) SelectObject(hdc, (HGDIOBJ)hFontLabels);
if(pwd->rows[i].swzLabel)
- GetTextExtentPoint32(hdc, pwd->rows[i].swzLabel, _tcslen(pwd->rows[i].swzLabel), &size);
+ GetTextExtentPoint32(hdc, pwd->rows[i].swzLabel, (int)_tcslen(pwd->rows[i].swzLabel), &size);
else
size.cy = size.cx = 0;
@@ -787,7 +787,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
smr.right -= options.padding;
if(!pwd->rows[i].value_newline) smr.right -= pwd->label_width + options.padding;
if(pwd->rows[i].swzValue)
- DrawText(hdc, pwd->rows[i].swzValue, _tcslen(pwd->rows[i].swzValue), &smr, DT_CALCRECT | DT_VCENTER | DT_LEFT | DT_WORDBREAK | DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | DT_NOPREFIX);
+ DrawText(hdc, pwd->rows[i].swzValue, (int)_tcslen(pwd->rows[i].swzValue), &smr, DT_CALCRECT | DT_VCENTER | DT_LEFT | DT_WORDBREAK | DT_WORD_ELLIPSIS | DT_END_ELLIPSIS | DT_NOPREFIX);
// save so we don't have to recalculate
pwd->rows[i].value_height = smr.bottom;