diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-24 12:33:43 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-24 12:33:43 +0000 |
commit | 6d99499879c434f212f4c02e751f730eca610983 (patch) | |
tree | 45fe6c186a4b89b1b0565a321b9ce4f166b873a8 /plugins/Chat/colorchooser.cpp | |
parent | 7a6399d054da0e2e21d00b110b885e15b278d3b7 (diff) |
Chat:
plusified
git-svn-id: http://svn.miranda-ng.org/main/trunk@602 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Chat/colorchooser.cpp')
-rw-r--r-- | plugins/Chat/colorchooser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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]);
|