diff options
Diffstat (limited to 'src/T2DLL/T2AdvertiseTable.cpp')
-rw-r--r-- | src/T2DLL/T2AdvertiseTable.cpp | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/src/T2DLL/T2AdvertiseTable.cpp b/src/T2DLL/T2AdvertiseTable.cpp index 0f353bf..e841425 100644 --- a/src/T2DLL/T2AdvertiseTable.cpp +++ b/src/T2DLL/T2AdvertiseTable.cpp @@ -34,11 +34,12 @@ void T2AdvertiseTable::Add(T2AdvertisePlugin* inPlugin, BOOL inSelect) { } void T2AdvertiseTable::Add(CFilePluginList* inPluginList) { + T2AdvertisePlugin *thePlugin; int theSubType = GetUserCon(); POSITION pos = inPluginList->GetHeadPosition(); while (pos) { - T2AdvertisePlugin *thePlugin = (T2AdvertisePlugin *) inPluginList->GetNext(pos); + thePlugin = (T2AdvertisePlugin *) inPluginList->GetNext(pos); if (thePlugin->GetSubType() == theSubType && !thePlugin->IsTieupFinish()) Add(thePlugin, false); } @@ -51,14 +52,14 @@ void T2AdvertiseTable::Add(CFilePluginList* inPluginList) { CFont font; CPen pen; - CBrush brush; + CBrush theBrush; RECT cellRect; if (FetchLocalCellFrame(inCell, cellRect) && inCell.col == 1) { T2AdvertisePlugin *thePlugin; GetCellData(inCell, &thePlugin); if (thePlugin) { - DWORD theSubType = GetUserCon(); + DWORD pluginType = GetUserCon(); int x = cellRect.left + 4; int y = cellRect.bottom - 12; @@ -66,7 +67,7 @@ void T2AdvertiseTable::Add(CFilePluginList* inPluginList) { pDC->SelectObject(&font); pDC->SetBkMode(TRANSPARENT); - if (theSubType == 'CFPI') { + if (pluginType == 'CFPI') { if (IsMark(inCell.row)) { RECT rect; rect.left = x; @@ -75,9 +76,9 @@ void T2AdvertiseTable::Add(CFilePluginList* inPluginList) { rect.bottom = y + 4; pen.CreateStockObject(BLACK_PEN); - brush.CreateStockObject(WHITE_BRUSH); + theBrush.CreateStockObject(WHITE_BRUSH); pDC->SelectObject(&pen); - pDC->SelectObject(&brush); + pDC->SelectObject(&theBrush); pDC->MoveTo(rect.left + 2, rect.top + 3); pDC->LineTo((rect.right + rect.left) / 2 - 2, rect.bottom - 1); @@ -88,9 +89,9 @@ void T2AdvertiseTable::Add(CFilePluginList* inPluginList) { y = cellRect.bottom - 12; } - CString text; - thePlugin->GetName(text); - pDC->TextOutA(x, y, text, strlen(text)); + CString pluginName; + thePlugin->GetName(pluginName); + pDC->TextOutA(x, y, pluginName, strlen(pluginName)); } } @@ -109,30 +110,30 @@ void T2AdvertiseTable::ClickCell(const TableCellT& inCell, const CPoint& inPt) { } BOOL T2AdvertiseTable::IsMark(unsigned int inRow) { - void *data = NULL; + void *theData = NULL; - TableCellT cell; - cell.row = inRow; - cell.col = 2; - GetCellData(cell, &data); + TableCellT theCell; + theCell.row = inRow; + theCell.col = 2; + GetCellData(theCell, &theData); - return (data != NULL); + return (theData != NULL); } void T2AdvertiseTable::SetMark(unsigned int inRow, BOOL inValue) { - void *data = inValue ? this : NULL; + void *theData = inValue ? this : NULL; - TableCellT cell; - cell.row = inRow; - cell.col = 2; - SetCellData(cell, &data); + TableCellT theCell; + theCell.row = inRow; + theCell.col = 2; + SetCellData(theCell, &theData); InvalidateRect(NULL); } /*virtual*/ void T2AdvertiseTable::OnT2DlgItemLButtonDown(UINT inFlags, CPoint inPt) { POINT pt = inPt; - ClientToView(&inPt, 1); + ClientToView(&pt, 1); TableCellT cell; FetchCellHitBy(pt, cell); @@ -144,14 +145,14 @@ void T2AdvertiseTable::SetMark(unsigned int inRow, BOOL inValue) { /*virtual*/ BOOL T2AdvertiseTable::OnT2DlgItemEraseBkgnd(CDC* pDC) { T2VerticalTable::OnT2DlgItemEraseBkgnd(pDC); - unsigned int rows, cols; - GetTableSize(rows, cols); + unsigned int numOfRows, numOfColumns, theRow, theColumn; - for (unsigned int col = 1; col <= cols; col++) { - for (unsigned int row = 1; row <= rows; row++) { + GetTableSize(numOfRows, numOfColumns); + for (theColumn = 1; theColumn <= numOfColumns; theColumn++) { + for (theRow = 1; theRow <= numOfRows; theRow++) { TableCellT cell; - cell.row = row; - cell.col = col; + cell.row = theRow; + cell.col = theColumn; DrawCell(pDC, cell); } } |