Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: crash at vector::push_back. Pin
VC++Maniac19-Dec-08 3:11
VC++Maniac19-Dec-08 3:11 
GeneralRe: crash at vector::push_back. [modified] Pin
Iain Clarke, Warrior Programmer19-Dec-08 3:31
Iain Clarke, Warrior Programmer19-Dec-08 3:31 
GeneralRe: crash at vector::push_back. Pin
CPallini19-Dec-08 8:17
mveCPallini19-Dec-08 8:17 
GeneralRe: crash at vector::push_back. Pin
VC++Maniac28-Dec-08 1:58
VC++Maniac28-Dec-08 1:58 
GeneralRe: crash at vector::push_back. Pin
CPallini19-Dec-08 8:11
mveCPallini19-Dec-08 8:11 
GeneralRe: crash at vector::push_back. Pin
Randor 19-Dec-08 3:22
professional Randor 19-Dec-08 3:22 
AnswerRe: crash at vector::push_back. Pin
semitae11-Feb-10 1:28
semitae11-Feb-10 1:28 
QuestionHow can Get RECT value? Pin
Le@rner19-Dec-08 1:14
Le@rner19-Dec-08 1:14 
hi all,

I m using a ListCtrl,here diffrent rows and column are present.
for example there is 10 row and 4 column.

i want a RECT value for corresponding row and column.

i m using this.

CRect CDemo::GetCellRect(int nRow, int nCol)
{
   ASSERT(nCol >= 0 && nCol < m_nPageCols);
   ASSERT(nRow >= 0 && nRow < m_nRowCount);
   CSize charSize = m_CharSizeBody;
   CRect rectBody = m_rectBody;
   CRect rectCol = GetColumnRect(0);
   for (int nLeft=0, i=0; i < nCol; i++) 
      nLeft += GetColumnWidth(m_nColumns[i]);
   int nRight = nLeft + GetColumnWidth(m_nColumns[i]);   
   int nPageRow =  nRow % m_nPageRows;
   ASSERT(nPageRow <= m_nPageRows);
   CRect rect(
      rectBody.left + nLeft, 
      rectBody.top + rectCol.Height() + charSize.cy * nPageRow, 
      rectBody.left + nRight, 
      rectBody.top + rectCol.Height() + charSize.cy * (nPageRow + 1));
   if (rect.right > rectBody.right)
      rect.right = rectBody.right;
   rect.left += (int)(CELL_PADDING * m_RatioX);
   return rect;
}


but this gives some wrong values.
for all columns in one row its gives same value and put data in 1st column.

i want to put data in corresponding row and columns.

please correct me.

thanks in advance.

IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH

AnswerRe: How can Get RECT value? Pin
Stuart Dootson19-Dec-08 2:30
professionalStuart Dootson19-Dec-08 2:30 
QuestionRe: How can Get RECT value? Pin
CPallini19-Dec-08 2:37
mveCPallini19-Dec-08 2:37 
QuestionException handling in C++ Pin
San19-Dec-08 1:03
San19-Dec-08 1:03 
AnswerRe: Exception handling in C++ [modified] Pin
Jijo.Raj19-Dec-08 1:54
Jijo.Raj19-Dec-08 1:54 
GeneralRe: Exception handling in C++ Pin
Stuart Dootson19-Dec-08 2:24
professionalStuart Dootson19-Dec-08 2:24 
GeneralRe: Exception handling in C++ Pin
Jijo.Raj19-Dec-08 2:29
Jijo.Raj19-Dec-08 2:29 
GeneralRe: Exception handling in C++ Pin
Stuart Dootson19-Dec-08 2:34
professionalStuart Dootson19-Dec-08 2:34 
GeneralRe: Exception handling in C++ Pin
Jijo.Raj19-Dec-08 2:41
Jijo.Raj19-Dec-08 2:41 
GeneralRe: Exception handling in C++ Pin
Stuart Dootson19-Dec-08 2:54
professionalStuart Dootson19-Dec-08 2:54 
GeneralRe: Exception handling in C++ Pin
Jijo.Raj19-Dec-08 3:25
Jijo.Raj19-Dec-08 3:25 
GeneralRe: Exception handling in C++ Pin
Stuart Dootson19-Dec-08 3:42
professionalStuart Dootson19-Dec-08 3:42 
AnswerRe: Exception handling in C++ [modified] Pin
Stuart Dootson19-Dec-08 2:27
professionalStuart Dootson19-Dec-08 2:27 
AnswerRe: Exception handling in C++ Pin
Stuart Dootson19-Dec-08 2:58
professionalStuart Dootson19-Dec-08 2:58 
QuestionHow to prevent ScrollBar hiding in a ScrollView Pin
pauvc19-Dec-08 0:50
pauvc19-Dec-08 0:50 
QuestionFSCTL_GET_VOLUME_BITMAP Pin
john563218-Dec-08 23:59
john563218-Dec-08 23:59 
AnswerRe: FSCTL_GET_VOLUME_BITMAP Pin
Jijo.Raj19-Dec-08 0:24
Jijo.Raj19-Dec-08 0:24 
GeneralRe: FSCTL_GET_VOLUME_BITMAP Pin
john563219-Dec-08 0:41
john563219-Dec-08 0:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.