Click here to Skip to main content
15,912,897 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Another CAsyncSocket Problem Pin
TheInfernalCrow7-Nov-07 19:25
TheInfernalCrow7-Nov-07 19:25 
QuestionAdd an image on a button. Pin
CodingLover6-Nov-07 21:47
CodingLover6-Nov-07 21:47 
AnswerRe: Add an image on a button. [modified] Pin
Nelek6-Nov-07 22:16
protectorNelek6-Nov-07 22:16 
AnswerRe: Add an image on a button. Pin
Haroon Sarwar6-Nov-07 22:38
Haroon Sarwar6-Nov-07 22:38 
AnswerRe: Add an image on a button. Pin
Hamid_RT7-Nov-07 0:20
Hamid_RT7-Nov-07 0:20 
AnswerRe: Add an image on a button. Pin
David Crow7-Nov-07 4:41
David Crow7-Nov-07 4:41 
GeneralRe: Add an image on a button. Pin
CodingLover7-Nov-07 17:12
CodingLover7-Nov-07 17:12 
QuestionCListCtrl subitem text color problem [Solved] Pin
fantasy12156-Nov-07 21:35
fantasy12156-Nov-07 21:35 
The function I wanted is when a subitem contains some text, I use some textcolor to show the subitem.

my code are:

first map the message
BEGIN_MESSAGE_MAP(CMyListCtrl, CListCtrl)
  ON_NOTIFY_REFLECT(NM_CUSTOMDRAW, OnCustomDraw)
END_MESSAGE_MAP()

void CMyListCtrl::OnCustomDraw(NMHDR *pNMHDR, LRESULT *pResult)
{
  LPLVNMCUSTOMDRAW lplvcd = (LPLVNMCUSTOMDRAW)pNMHDR;
  int iItem = lplvcd->nmcd.dwItemSpec;
  int iSubItem = lplvcd->iSubItem;
  switch (lplvcd->nmcd.dwDrawStage)
  {
    case CDDS_PREPAINT:
      *pResult = CDRF_NOTIFYITEMDRAW;
      return;
    case CDDS_ITEMPREPAINT:
    {
      *pResult = CDRF_NOTIFYSUBITEMDRAW;
      return;
    }
    case CDDS_SUBITEM | CDDS_ITEMPREPAINT:
    {
      CString strSubItem;
      strSubItem = GetItemText(iItem, iSubItem);
      if (strSubItem.Find(_T("loop")) != -1)
      {
        //Actually lplvcd->clrText controls the whole item row not subitem, who can help me out.
        lplvcd->clrText = RGB(200, 200, 0);
      }
<big>
      else
        lplvcd->clrText = ::GetSysColor(some nornal color);
</big>
      *pResult = CDRF_DODEFAULT;
      return;
    }
  }
}




-- modified at 21:14 Wednesday 7th November, 2007
GeneralRe: CListCtrl subitem text color problem Pin
fantasy12157-Nov-07 14:20
fantasy12157-Nov-07 14:20 
AnswerOfftopic Pin
Nelek7-Nov-07 21:06
protectorNelek7-Nov-07 21:06 
QuestionHow can i print whole screen content through printer? Pin
bankey10106-Nov-07 21:24
bankey10106-Nov-07 21:24 
AnswerRe: How can i print whole screen content through printer? Pin
Nelek6-Nov-07 22:12
protectorNelek6-Nov-07 22:12 
AnswerRe: Context Menu problem Pin
Nelek6-Nov-07 21:17
protectorNelek6-Nov-07 21:17 
Questionaudio recording Pin
kadkir6-Nov-07 20:39
kadkir6-Nov-07 20:39 
GeneralRe: audio recording Pin
Matthew Faithfull6-Nov-07 23:18
Matthew Faithfull6-Nov-07 23:18 
AnswerRe: audio recording Pin
Nishad S7-Nov-07 0:43
Nishad S7-Nov-07 0:43 
QuestionRe: audio recording Pin
kadkir9-Nov-07 17:24
kadkir9-Nov-07 17:24 
AnswerRe: audio recording Pin
Mark Salsbery7-Nov-07 7:40
Mark Salsbery7-Nov-07 7:40 
Questionfind the largest 1000 values Pin
George_George6-Nov-07 20:31
George_George6-Nov-07 20:31 
AnswerRe: find the largest 1000 values Pin
Sameerkumar Namdeo6-Nov-07 20:50
Sameerkumar Namdeo6-Nov-07 20:50 
GeneralRe: find the largest 1000 values Pin
George_George6-Nov-07 21:15
George_George6-Nov-07 21:15 
GeneralRe: find the largest 1000 values Pin
Neo Andreson6-Nov-07 21:26
Neo Andreson6-Nov-07 21:26 
GeneralRe: find the largest 1000 values Pin
George_George7-Nov-07 0:59
George_George7-Nov-07 0:59 
GeneralRe: find the largest 1000 values Pin
CPallini6-Nov-07 21:36
mveCPallini6-Nov-07 21:36 
GeneralRe: find the largest 1000 values Pin
George_George7-Nov-07 1:02
George_George7-Nov-07 1:02 

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.