Click here to Skip to main content
15,907,687 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Wireless comm. through Wi Fi Pin
Hamid_RT1-Feb-07 20:34
Hamid_RT1-Feb-07 20:34 
QuestionChild windows Pin
NorGUI31-Jan-07 22:15
NorGUI31-Jan-07 22:15 
AnswerRe: Child windows Pin
Hamid_RT1-Feb-07 0:28
Hamid_RT1-Feb-07 0:28 
GeneralRe: Child windows Pin
NorGUI1-Feb-07 0:50
NorGUI1-Feb-07 0:50 
QuestionHow to kill Parent and child processes togather Pin
dvsr31-Jan-07 22:14
dvsr31-Jan-07 22:14 
AnswerRe: How to kill Apache Pin
Roger Stoltz31-Jan-07 23:21
Roger Stoltz31-Jan-07 23:21 
AnswerRe: How to kill Parent and child processes togather Pin
Hamid_RT1-Feb-07 0:27
Hamid_RT1-Feb-07 0:27 
GeneralRe: How to kill Parent and child processes togather Pin
dvsr1-Feb-07 0:33
dvsr1-Feb-07 0:33 
GeneralRe: How to kill Parent and child processes togather Pin
Hamid_RT1-Feb-07 20:42
Hamid_RT1-Feb-07 20:42 
Questioni hope this question can be asked here Pin
kalaveer31-Jan-07 21:56
kalaveer31-Jan-07 21:56 
AnswerRe: i hope this question can be asked here Pin
Don Box31-Jan-07 22:19
Don Box31-Jan-07 22:19 
AnswerRe: i hope this question can be asked here Pin
Christian Graus31-Jan-07 22:48
protectorChristian Graus31-Jan-07 22:48 
QuestionList control width problem in MFC Pin
pandyapunita31-Jan-07 20:35
pandyapunita31-Jan-07 20:35 
AnswerRe: List control width problem in MFC Pin
Naveen31-Jan-07 21:02
Naveen31-Jan-07 21:02 
GeneralRe: List control width problem in MFC Pin
pandyapunita31-Jan-07 22:38
pandyapunita31-Jan-07 22:38 
GeneralRe: List control width problem in MFC Pin
pandyapunita1-Feb-07 2:54
pandyapunita1-Feb-07 2:54 
GeneralRe: List control width problem in MFC Pin
Naveen1-Feb-07 16:20
Naveen1-Feb-07 16:20 
GeneralRe: List control width problem in MFC Pin
pandyapunita1-Feb-07 18:28
pandyapunita1-Feb-07 18:28 
GeneralRe: List control width problem in MFC Pin
Naveen1-Feb-07 19:06
Naveen1-Feb-07 19:06 
try the code below


void ListCtrlEx::OnCustomDraw( NMHDR* pNMHDR_i, LRESULT* pResult_i )<br />
{<br />
    NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR_i );<br />
    NMCUSTOMDRAW   &nmcd = pLVCD->nmcd;<br />
    *pResult_i = CDRF_DODEFAULT;<br />
    switch (nmcd.dwDrawStage)<br />
    {<br />
    case CDDS_PREPAINT:<br />
      // We want item prepaint notifications, so...<br />
      *pResult_i = CDRF_NOTIFYITEMDRAW;<br />
      break;<br />
<br />
    case CDDS_ITEMPREPAINT:<br />
     {<br />
         // Want to merge a column in 3 rd row<br />
         if( nmcd.dwItemSpec == 3 )<br />
         {<br />
               LVCOLUMN stColumn = {0};<br />
               stColumn.mask = LVCF_WIDTH | LVCF_FMT;<br />
               for ( int nCol=0; GetColumn( nCol, &stColumn ); ++nCol )<br />
               {<br />
                   CRect ColumnRect;<br />
                   GetSubItemRect( nmcd.dwItemSpec , nCol, LVIR_LABEL, ColumnRect );<br />
                   // Merge 2 and 3 rd column so<br />
                   CRect ColumnRect2;<br />
                   CString csText = "some text";<br />
                   if( nCol == 2 )<br />
                   {<br />
                       GetSubItemRect( nmcd.dwItemSpec , ++nCol, LVIR_LABEL, ColumnRect2 );<br />
                       ColumnRect.right = ColumnRect2.right;<br />
                       csText = "merged text";<br />
                   }<br />
                   CDC *pdc = CDC::FromHandle( nmcd.hdc );                   <br />
                   pdc->DrawText( csText, ColumnRect, DT_SINGLELINE|DT_LEFT|DT_VCENTER );<br />
               }<br />
               *pResult_i = CDRF_SKIPDEFAULT;<br />
               return;<br />
         }        <br />
      *pResult_i = CDRF_DODEFAULT;<br />
      break;<br />
    }<br />
    default:<br />
      *pResult_i = CDRF_DODEFAULT;<br />
      break;<br />
    }<br />
}




nave

GeneralRe: List control width problem in MFC Pin
pandyapunita2-Feb-07 0:10
pandyapunita2-Feb-07 0:10 
GeneralRe: List control width problem in MFC Pin
Naveen2-Feb-07 0:39
Naveen2-Feb-07 0:39 
GeneralRe: List control width problem in MFC Pin
pandyapunita2-Feb-07 1:11
pandyapunita2-Feb-07 1:11 
GeneralRe: List control width problem in MFC Pin
Naveen2-Feb-07 1:13
Naveen2-Feb-07 1:13 
Questionlanguages Pin
zlatane31-Jan-07 20:20
zlatane31-Jan-07 20:20 
AnswerRe: languages Pin
Hamid_RT31-Jan-07 20:28
Hamid_RT31-Jan-07 20:28 

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.