Index: src/ch/StaticEx.cpp =================================================================== diff -u -rd5c3edd0d167db9b5d47d04248820fda49499a5e -rc435ab507c8b8280264188b49e9ada56d46c0261 --- src/ch/StaticEx.cpp (.../StaticEx.cpp) (revision d5c3edd0d167db9b5d47d04248820fda49499a5e) +++ src/ch/StaticEx.cpp (.../StaticEx.cpp) (revision c435ab507c8b8280264188b49e9ada56d46c0261) @@ -174,7 +174,7 @@ ::SetWindowOrgEx(hdc, ps.rcPaint.left, ps.rcPaint.top, NULL); // paint the background - ::FillRect(hdc, &ps.rcPaint, (HBRUSH)::SendMessage((HWND)::GetWindowLong(hwnd, GWLP_HWNDPARENT), WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd)); + ::FillRect(hdc, &ps.rcPaint, ::GetSysColorBrush(COLOR_BTNFACE)); // size of the all control RECT rcCtl; @@ -314,7 +314,7 @@ // wParam - count // lParam - addr of a buffer if (pSettings->pszLink) - _tcsncpy((PTSTR)lParam, pSettings->pszLink, (int)wParam); + _tcsncpy((PTSTR)lParam, pSettings->pszLink, boost::numeric_cast(wParam)); else _tcscpy((PTSTR)lParam, _T("")); @@ -328,25 +328,25 @@ bool RegisterStaticExControl(HINSTANCE hInstance) { - WNDCLASS wndcls; + WNDCLASS wndcls; - if (!(::GetClassInfo(hInstance, STATICEX_CLASS, &wndcls))) - { - // need to register a new class - wndcls.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW; + if (!(::GetClassInfo(hInstance, STATICEX_CLASS, &wndcls))) + { + // need to register a new class + wndcls.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW; wndcls.lpfnWndProc = ::StaticExWndProc; - wndcls.cbClsExtra = 0; + wndcls.cbClsExtra = 0; wndcls.cbWndExtra = sizeof(STATICEXSETTINGS*); - wndcls.hInstance = hInstance; - wndcls.hIcon = NULL; + wndcls.hInstance = hInstance; + wndcls.hIcon = NULL; wndcls.hCursor = NULL; // will load each time needed - wndcls.hbrBackground = NULL; - wndcls.lpszMenuName = NULL; - wndcls.lpszClassName = STATICEX_CLASS; + wndcls.hbrBackground = NULL; + wndcls.lpszMenuName = NULL; + wndcls.lpszClassName = STATICEX_CLASS; - if (!RegisterClass(&wndcls)) - return false; - } + if (!RegisterClass(&wndcls)) + return false; + } - return true; + return true; }