From f83866f42f386ce9f2cbdacd7c509aa1d668a2e3 Mon Sep 17 00:00:00 2001 From: zilmar Date: Fri, 5 Oct 2012 19:15:21 +1000 Subject: [PATCH] update warnings in WTL controls --- .../User Interface/WTL Controls/ClistCtrl/DropArrows.h | 3 ++- .../User Interface/WTL Controls/ClistCtrl/ListCombo.h | 3 ++- .../User Interface/WTL Controls/ClistCtrl/ListDate.h | 3 ++- .../User Interface/WTL Controls/ClistCtrl/ListEdit.h | 3 ++- .../User Interface/WTL Controls/ClistCtrl/TitleTip.h | 3 ++- .../User Interface/WTL Controls/PartialGroupBox.cpp | 6 +++--- Source/Project64/User Interface/WTL Controls/numberctrl.h | 7 +++---- 7 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Source/Project64/User Interface/WTL Controls/ClistCtrl/DropArrows.h b/Source/Project64/User Interface/WTL Controls/ClistCtrl/DropArrows.h index dc080fd2a..27c7d6a70 100644 --- a/Source/Project64/User Interface/WTL Controls/ClistCtrl/DropArrows.h +++ b/Source/Project64/User Interface/WTL Controls/ClistCtrl/DropArrows.h @@ -31,7 +31,8 @@ public: m_bVertical = bVertical; m_nSpanLength = nSpanLength + 20; - if ( CWindowImpl< CDropArrows >::Create( hWndParent, (CRect( 0, 0, m_bVertical ? 12 : m_nSpanLength, m_bVertical ? m_nSpanLength : 12 )), NULL, WS_POPUP | WS_DISABLED, WS_EX_TOOLWINDOW ) == NULL ) + CRect area( 0, 0, m_bVertical ? 12 : m_nSpanLength, m_bVertical ? m_nSpanLength : 12 ); + if ( CWindowImpl< CDropArrows >::Create( hWndParent, area, NULL, WS_POPUP | WS_DISABLED, WS_EX_TOOLWINDOW ) == NULL ) return FALSE; POINT ptArrow[ 7 ]; diff --git a/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListCombo.h b/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListCombo.h index 5757012e8..462e9ed1b 100644 --- a/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListCombo.h +++ b/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListCombo.h @@ -64,7 +64,8 @@ public: dwStyle |= CBS_UPPERCASE; // create combo control - if ( CWindowImpl< CListCombo, CComboBox >::Create( hWndParent, (CRect( ( ( dwStyle & CBS_DROPDOWNLIST ) == CBS_DROPDOWNLIST ) ? rcRect.left + 3 : rcRect.left + 1, rcRect.top, rcRect.right, rcRect.bottom + ( 6 * rcRect.Height() ) )), NULL, dwStyle ) == NULL ) + CRect Area( ( ( dwStyle & CBS_DROPDOWNLIST ) == CBS_DROPDOWNLIST ) ? rcRect.left + 3 : rcRect.left + 1, rcRect.top, rcRect.right, rcRect.bottom + ( 6 * rcRect.Height() ) ); + if ( CWindowImpl< CListCombo, CComboBox >::Create( hWndParent, Area, NULL, dwStyle ) == NULL ) return FALSE; // get system message font diff --git a/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListDate.h b/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListDate.h index a7fb65c18..2c8de08c2 100644 --- a/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListDate.h +++ b/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListDate.h @@ -48,7 +48,8 @@ public: dwStyle |= DTS_UPDOWN; // create date-time control - if ( CWindowImpl< CListDate, CDateTimePickerCtrl >::Create( hWndParent, (CRect( rcRect.left + 3, rcRect.top + 2, rcRect.right - 3, rcRect.bottom - 2 )), NULL, dwStyle ) == NULL ) + CRect Area( rcRect.left + 3, rcRect.top + 2, rcRect.right - 3, rcRect.bottom - 2 ); + if ( CWindowImpl< CListDate, CDateTimePickerCtrl >::Create( hWndParent, Area, NULL, dwStyle ) == NULL ) return FALSE; // remove border diff --git a/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListEdit.h b/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListEdit.h index fada04c3a..d07dd9d41 100644 --- a/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListEdit.h +++ b/Source/Project64/User Interface/WTL Controls/ClistCtrl/ListEdit.h @@ -49,7 +49,8 @@ public: dwStyle |= ES_UPPERCASE; // create edit control - if ( CWindowImpl< CListEdit, CEdit >::Create( hWndParent, (CRect( rcRect.left - 2, rcRect.top - 3, rcRect.right + 3, rcRect.bottom + 2 )), NULL, dwStyle ) == NULL ) + CRect Area( rcRect.left - 2, rcRect.top - 3, rcRect.right + 3, rcRect.bottom + 2 ); + if ( CWindowImpl< CListEdit, CEdit >::Create( hWndParent, Area, NULL, dwStyle ) == NULL ) return FALSE; // get system message font diff --git a/Source/Project64/User Interface/WTL Controls/ClistCtrl/TitleTip.h b/Source/Project64/User Interface/WTL Controls/ClistCtrl/TitleTip.h index 634795c90..e4ad5bed4 100644 --- a/Source/Project64/User Interface/WTL Controls/ClistCtrl/TitleTip.h +++ b/Source/Project64/User Interface/WTL Controls/ClistCtrl/TitleTip.h @@ -41,7 +41,8 @@ public: m_rgbBackgroundTop = RGB( 250, 250, 250 ); m_rgbBackgroundBottom = RGB( 235, 235, 235 ); - if ( CWindowImpl< CTitleTip >::Create( hWndParent, CRect(NULL), NULL, WS_POPUP, WS_EX_TOOLWINDOW | WS_EX_TOPMOST ) == NULL ) + CRect Area(NULL); + if ( CWindowImpl< CTitleTip >::Create( hWndParent, Area, NULL, WS_POPUP, WS_EX_TOOLWINDOW | WS_EX_TOPMOST ) == NULL ) return FALSE; // create the tooltip diff --git a/Source/Project64/User Interface/WTL Controls/PartialGroupBox.cpp b/Source/Project64/User Interface/WTL Controls/PartialGroupBox.cpp index e9d066c3d..34ac176fd 100644 --- a/Source/Project64/User Interface/WTL Controls/PartialGroupBox.cpp +++ b/Source/Project64/User Interface/WTL Controls/PartialGroupBox.cpp @@ -10,12 +10,12 @@ BOOL CPartialGroupBox::AttachToDlgItem(HWND parent, UINT dlgID) return SubclassWindow(::GetDlgItem(parent,dlgID)); } -void CPartialGroupBox::Draw3dLine(CPaintDC & dc, LPCRECT lpRect, COLORREF clrTopLeft, COLORREF clrBottomRight) +void CPartialGroupBox::Draw3dLine(CPaintDC & dc, LPCRECT lpRect, COLORREF clrTopLeft, COLORREF /*clrBottomRight*/) { int x = lpRect->left; int y = lpRect->top; int cx = lpRect->right - lpRect->left; - int cy = lpRect->bottom - lpRect->top; + //int cy = lpRect->bottom - lpRect->top; dc.FillSolidRect(x, y, cx - 1, 1, clrTopLeft); //dc.FillSolidRect(x, y, 1, cy - 1, clrTopLeft); @@ -23,7 +23,7 @@ void CPartialGroupBox::Draw3dLine(CPaintDC & dc, LPCRECT lpRect, COLORREF clrTop //dc.FillSolidRect(x, y + cy, cx, -1, clrBottomRight); } -void CPartialGroupBox::OnPaint(HDC hDC) +void CPartialGroupBox::OnPaint(HDC /*hDC*/) { CPaintDC dc(m_hWnd); diff --git a/Source/Project64/User Interface/WTL Controls/numberctrl.h b/Source/Project64/User Interface/WTL Controls/numberctrl.h index 306fd3e00..c75ca5af4 100644 --- a/Source/Project64/User Interface/WTL Controls/numberctrl.h +++ b/Source/Project64/User Interface/WTL Controls/numberctrl.h @@ -100,7 +100,7 @@ protected: for(unsigned int i=0;i 0 ? WindowText[0] : 0; char second = Len > 1 ? WindowText[1] : 0; - bool bCut=true; if (uMsg == WM_CHAR) {