From 6d99499879c434f212f4c02e751f730eca610983 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 24 Jun 2012 12:33:43 +0000 Subject: Chat: plusified git-svn-id: http://svn.miranda-ng.org/main/trunk@602 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Chat/colorchooser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/Chat/colorchooser.cpp') diff --git a/plugins/Chat/colorchooser.cpp b/plugins/Chat/colorchooser.cpp index 2402b8c399..0d2642165f 100644 --- a/plugins/Chat/colorchooser.cpp +++ b/plugins/Chat/colorchooser.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static int CalculateCoordinatesToButton(COLORCHOOSER * pCC, POINT pt) { - int iSquareRoot = (int)sqrt(pCC->pModule->nColorCount); + int iSquareRoot = (int)sqrt((double)pCC->pModule->nColorCount); int nCols = iSquareRoot * iSquareRoot < pCC->pModule->nColorCount?iSquareRoot+1:iSquareRoot; int col = pt.x / 25; @@ -42,7 +42,7 @@ static int CalculateCoordinatesToButton(COLORCHOOSER * pCC, POINT pt) static RECT CalculateButtonToCoordinates(COLORCHOOSER * pCC, int buttonPosition) { RECT pt; - int iSquareRoot = (int)sqrt(pCC->pModule->nColorCount); + int iSquareRoot = (int)sqrt((double)pCC->pModule->nColorCount); int nCols = iSquareRoot * iSquareRoot < pCC->pModule->nColorCount?iSquareRoot+1:iSquareRoot; int row = buttonPosition / nCols; @@ -79,7 +79,7 @@ INT_PTR CALLBACK DlgProcColorToolWindow(HWND hwndDlg, UINT msg, WPARAM wParam, L iCurrentHotTrack = -2; bChoosing = FALSE; - iSquareRoot = (int)sqrt(pCC->pModule->nColorCount); + iSquareRoot = (int)sqrt((double)pCC->pModule->nColorCount); iColumns = iSquareRoot * iSquareRoot == pCC->pModule->nColorCount?iSquareRoot:iSquareRoot+1; iRows = iSquareRoot; @@ -234,7 +234,7 @@ INT_PTR CALLBACK DlgProcColorToolWindow(HWND hwndDlg, UINT msg, WPARAM wParam, L rc.bottom = iThisRow * 20- 3 + 20 ; rc.right = iThisColumn * 25-3 ; - FillRect(hdc, &rc, GetStockObject(BLACK_BRUSH)); + FillRect(hdc, &rc, (HBRUSH)GetStockObject(BLACK_BRUSH)); hbr = CreateSolidBrush(pCC->pModule->crColors[i]); -- cgit v1.2.3