Click here to Skip to main content
15,041,264 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Change color of controls of a dialog Pin
ThatsAlok31-May-05 1:25
MemberThatsAlok31-May-05 1:25 
GeneralRe: Change color of controls of a dialog Pin
Ward31-May-05 3:46
MemberWard31-May-05 3:46 
GeneralRe: Change color of controls of a dialog Pin
Cedric Moonen31-May-05 3:56
MemberCedric Moonen31-May-05 3:56 
GeneralRe: Change color of controls of a dialog Pin
Ward31-May-05 4:14
MemberWard31-May-05 4:14 
GeneralRe: Change color of controls of a dialog Pin
ThatsAlok31-May-05 19:21
MemberThatsAlok31-May-05 19:21 
GeneralSoap Toolkit 3.0 Redistributable Pin
SAKURAVN30-May-05 23:54
MemberSAKURAVN30-May-05 23:54 
GeneralNeed help to use the Sort Iist Control with XP-Style! Pin
bosfan30-May-05 23:47
Memberbosfan30-May-05 23:47 
GeneralRe: Need help to use the Sort Iist Control with XP-Style! Pin
Jack Puppy31-May-05 3:54
MemberJack Puppy31-May-05 3:54 
Depending on how finicky you are, you can do it using NM_CUSTOMDRAW.

Here's something what I did:

<br />
void CSortHeaderCtrl::OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult)<br />
{<br />
  LPNMCUSTOMDRAW pNMCustomDraw = reinterpret_cast<LPNMCUSTOMDRAW>(pNMHDR);<br />
<br />
	  // Assume default processing<br />
      *pResult = CDRF_DODEFAULT;<br />
<br />
	  // Pre-paint stage for control; return flag so that we get messages for<br />
      // each item<br />
	  if (pNMCustomDraw->dwDrawStage == CDDS_PREPAINT)<br />
		    *pResult = CDRF_NOTIFYITEMDRAW;<br />
	  // Pre-paint stage for item; return flag so that we get messages after<br />
	  // each item is painted<br />
	  else if (pNMCustomDraw->dwDrawStage == CDDS_ITEMPREPAINT)<br />
		    *pResult |= CDRF_NOTIFYPOSTPAINT;<br />
	  // Post-paint stage for item<br />
	  else if (pNMCustomDraw->dwDrawStage == CDDS_ITEMPOSTPAINT)<br />
	  {<br />
		    CDC* pDC = CDC::FromHandle(pNMCustomDraw->hdc);<br />
		    ASSERT_VALID(pDC);<br />
		    if (!pDC)<br />
			      return;<br />
<br />
<br />
            int nColumn = static_cast<int>(pNMCustomDraw->dwItemSpec);<br />
        <br />
            // Current column is the sorted column<br />
            if (nColumn == m_nSortColumn)<br />
                 // DRAW ARROW HERE<br />
          }<br />
}<br />



Suspicious | :suss: Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
GeneralRe: Need help to use the Sort Iist Control with XP-Style! Pin
Anonymous1-Jun-05 1:22
MemberAnonymous1-Jun-05 1:22 
GeneralRe: Need help to use the Sort Iist Control with XP-Style! Pin
bosfan1-Jun-05 2:23
Memberbosfan1-Jun-05 2:23 
GeneralCListBox with titles Pin
Vaclav30-May-05 23:20
MemberVaclav30-May-05 23:20 
GeneralRe: CListBox with titles Pin
S Douglas31-May-05 1:04
professionalS Douglas31-May-05 1:04 
GeneralRe: CListBox with titles Pin
David Crow31-May-05 3:38
MemberDavid Crow31-May-05 3:38 
QuestionShell functions and versions ? Pin
Ramsus30-May-05 23:07
MemberRamsus30-May-05 23:07 
AnswerRe: Shell functions and versions ? Pin
David Crow31-May-05 3:41
MemberDavid Crow31-May-05 3:41 
GeneralMultithreaded horror.. Pin
Bob Stanneveld30-May-05 22:04
MemberBob Stanneveld30-May-05 22:04 
GeneralProblem solved.. Pin
Bob Stanneveld31-May-05 2:38
MemberBob Stanneveld31-May-05 2:38 
GeneralVisual C++ Pin
Member 150607130-May-05 21:40
MemberMember 150607130-May-05 21:40 
GeneralRe: Visual C++ Pin
Cedric Moonen30-May-05 21:50
MemberCedric Moonen30-May-05 21:50 
GeneralRe: Visual C++ Pin
toxcct30-May-05 22:26
Membertoxcct30-May-05 22:26 
GeneralRe: Visual C++ Pin
benjymous30-May-05 23:21
Memberbenjymous30-May-05 23:21 
GeneralRe: Visual C++ Pin
David Crow31-May-05 3:48
MemberDavid Crow31-May-05 3:48 
QuestionHow To Create a Transparent Pen? Pin
pritamkd30-May-05 20:45
Memberpritamkd30-May-05 20:45 
Questionhow to display string in debug widow. Pin
shumyla198330-May-05 20:31
Membershumyla198330-May-05 20:31 
AnswerRe: how to display string in debug widow. Pin
MK7830-May-05 20:35
MemberMK7830-May-05 20:35 

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.