Index: src/ch/PropertyListCtrl.cpp =================================================================== diff -u -r95e140c080a7424faba1bc9f35098e3cfd56d4e9 -rc435ab507c8b8280264188b49e9ada56d46c0261 --- src/ch/PropertyListCtrl.cpp (.../PropertyListCtrl.cpp) (revision 95e140c080a7424faba1bc9f35098e3cfd56d4e9) +++ src/ch/PropertyListCtrl.cpp (.../PropertyListCtrl.cpp) (revision c435ab507c8b8280264188b49e9ada56d46c0261) @@ -55,13 +55,13 @@ // Create the Brushes and Pens m_pBkBrush = new CBrush( GetSysColor(COLOR_BTNFACE)); m_pBkPen = new CPen( PS_SOLID, 1, GetSysColor(COLOR_BTNFACE)); -// m_pGrayPen = new CPen( PS_SOLID, 1, RGB(128,128,128)); + // m_pGrayPen = new CPen( PS_SOLID, 1, RGB(128,128,128)); m_pBlackBrush = new CBrush(GetSysColor(COLOR_BTNTEXT)); - // Create the CButton + // Create the CButton if( !CButton::Create(_T(""), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON|BS_OWNERDRAW, Rect, pParent, uID )) return FALSE; - + return 0; } @@ -73,12 +73,12 @@ CRect ButtonRect = lpDrawItemStruct->rcItem; CMemDC dc(prDC, ButtonRect); CMemDC *pDC=&dc; - + // Fill the Background CBrush* pOldBrush = (CBrush*)pDC->SelectObject( m_pBkBrush ); CPen* pOldPen = (CPen*)pDC->SelectObject(m_pBkPen); pDC->Rectangle(ButtonRect); - + // Draw the Correct Border if(lpDrawItemStruct->itemState & ODS_SELECTED) { @@ -306,21 +306,21 @@ // Make sure its a valid item if( lpDrawItemStruct->itemID == LB_ERR ) return; - - // Obtain the text for this item + + // Obtain the text for this item m_csText.Empty(); GetText(lpDrawItemStruct->itemID, m_csText); // Get the drawing DC CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC); - + // Set the Current member we are drawing - m_pCurDrawItem = (PROPERTYITEM*)m_Items.GetAt(m_Items.FindIndex(lpDrawItemStruct->itemID)); - + m_pCurDrawItem = (PROPERTYITEM*)m_Items.GetAt(m_Items.FindIndex(lpDrawItemStruct->itemID)); + // Obtain the Item Rect CRect ItemRect(lpDrawItemStruct->rcItem); - - // Draw This item + + // Draw This item DrawItem( pDC, ItemRect, lpDrawItemStruct->itemState & ODS_SELECTED); } void CPropertyListCtrl::MeasureItem(LPMEASUREITEMSTRUCT /*lpMeasureItemStruct*/) @@ -461,7 +461,7 @@ if(m_pCurItem->csProperties.GetSize() > 5) TempRect.bottom += GetItemHeight(0) * 5; else - TempRect.bottom += GetItemHeight(0) * (int)m_pCurItem->csProperties.GetSize(); + TempRect.bottom += GetItemHeight(0) * boost::numeric_cast(m_pCurItem->csProperties.GetSize()); // pobierz wsp�rz�dne tej kontrolki w stosunku do okna parenta // CRect rcThisParent; @@ -514,7 +514,7 @@ return; // Add it and select it - m_pCurItem->nPropertySelected = (int)m_pCurItem->csProperties.Add(csText); + m_pCurItem->nPropertySelected = boost::numeric_cast(m_pCurItem->csProperties.Add(csText)); } } void CPropertyListCtrl::OnEditChange() @@ -551,9 +551,9 @@ QuizFileDlg.m_ofn.lpstrInitialDir = csPath; if(QuizFileDlg.DoModal() != IDOK) return; - + // Obtain the Path they selected - m_pCurItem->csProperties.SetAt(0, QuizFileDlg.GetPathName()); + m_pCurItem->csProperties.SetAt(0, QuizFileDlg.GetPathName()); // Redraw RedrawWindow(); @@ -1017,7 +1017,7 @@ case ID_PROPERTY_FONT: if(m_pCurDrawItem->LogFont.lfHeight) - pDC->DrawText( m_pCurDrawItem->LogFont.lfFaceName, (int)_tcslen(m_pCurDrawItem->LogFont.lfFaceName), ItemRect, DT_SINGLELINE|DT_VCENTER|DT_LEFT|DT_NOPREFIX); + pDC->DrawText( m_pCurDrawItem->LogFont.lfFaceName, boost::numeric_cast(_tcslen(m_pCurDrawItem->LogFont.lfFaceName)), ItemRect, DT_SINGLELINE|DT_VCENTER|DT_LEFT|DT_NOPREFIX); break; } }