Click here to Skip to main content
15,906,766 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do you organize your shared source files? Pin
Michael P Butler8-Nov-01 9:01
Michael P Butler8-Nov-01 9:01 
AnswerRe: How do you organize your shared source files? Pin
Fazlul Kabir8-Nov-01 9:16
Fazlul Kabir8-Nov-01 9:16 
GeneralAnimation with OpenGL in MFC Pin
8-Nov-01 7:03
suss8-Nov-01 7:03 
GeneralChanging ActiveX control size(extents) Pin
8-Nov-01 5:54
suss8-Nov-01 5:54 
GeneralChanging the title in SDI app Pin
pmarki8-Nov-01 5:33
pmarki8-Nov-01 5:33 
GeneralRe: Changing the title in SDI app Pin
Michael P Butler8-Nov-01 9:05
Michael P Butler8-Nov-01 9:05 
GeneralRe: Changing the title in SDI app Pin
pmarki11-Nov-01 0:59
pmarki11-Nov-01 0:59 
GeneralCustom Draw in List Control Pin
RobJones8-Nov-01 5:26
RobJones8-Nov-01 5:26 
I pulled this example from Michael Dunn's Article at http://www.codeproject.com/listctrl/lvcustomdraw.asp... I'm lost
how do I repaint the headder instead of items?
void CMyDlg::OnCustomdrawMyList ( NMHDR* pNMHDR, LRESULT* pResult )
{
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );

    // Take the default processing unless we set this to something else below.
    *pResult = CDRF_DODEFAULT;

    // First thing - check the draw stage. If it's the control's prepaint
    // stage, then tell Windows we want messages for every item.

    if ( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage )
        {
        *pResult = CDRF_NOTIFYITEMDRAW;
        }
    else if ( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
        {
        // This is the prepaint stage for an item. Here's where we set the
        // item's text color. Our return value will tell Windows to draw the
        // item itself, but it will use the new color we set here.

        COLORREF crText;
        //This is where we need to paint the Headder instead of the item.. HOW?
        if ( (pLVCD->nmcd.dwItemSpec % 3) == 0 ) // Needs to point to the headder instead
            crText = RGB(255,0,0);

        // Store the color back in the NMLVCUSTOMDRAW struct.
        pLVCD->clrText = crText;

        // Tell Windows to paint the control itself.
        *pResult = CDRF_DODEFAULT;
        }
}

Thanks,

Rob
GeneralRe: Custom Draw in List Control Pin
moliate8-Nov-01 23:07
moliate8-Nov-01 23:07 
GeneralWin 9x System Monitor - what is.... (Save my day #2) Pin
peterchen8-Nov-01 5:05
peterchen8-Nov-01 5:05 
GeneralBasic GDI+ Question Pin
AJ1238-Nov-01 5:04
AJ1238-Nov-01 5:04 
GeneralRe: Basic GDI+ Question Pin
Christian Graus8-Nov-01 10:11
protectorChristian Graus8-Nov-01 10:11 
GeneralList of processes (Save My Day #1) Pin
peterchen8-Nov-01 4:57
peterchen8-Nov-01 4:57 
GeneralRe: List of processes (Save My Day #1) Pin
Michael P Butler8-Nov-01 5:06
Michael P Butler8-Nov-01 5:06 
GeneralRe: List of processes (Save My Day #1) Pin
Gert Boddaert8-Nov-01 21:48
Gert Boddaert8-Nov-01 21:48 
GeneralRe: List of processes (Save My Day #1) Pin
Sardaukar8-Nov-01 21:58
Sardaukar8-Nov-01 21:58 
GeneralRe: List of processes (Save My Day #1) Pin
moliate8-Nov-01 23:17
moliate8-Nov-01 23:17 
GeneralRe: List of processes (Save My Day #1) Pin
Tomasz Sowinski8-Nov-01 23:46
Tomasz Sowinski8-Nov-01 23:46 
GeneralRe: List of processes (Save My Day #1) Pin
moliate9-Nov-01 5:14
moliate9-Nov-01 5:14 
GeneralRe: List of processes (Save My Day #1) Pin
peterchen27-Nov-01 8:23
peterchen27-Nov-01 8:23 
GeneralPLZ! Help this MFC newbie! Drawing a dragging rectangle; my code doesn't work :-( Pin
8-Nov-01 4:55
suss8-Nov-01 4:55 
GeneralRe: PLZ! Help this MFC newbie! Drawing a dragging rectangle; my code doesn't work :-( Pin
Chris Losinger8-Nov-01 4:59
professionalChris Losinger8-Nov-01 4:59 
GeneralRe: PLZ! Help this MFC newbie! Drawing a dragging rectangle; my code doesn't work :-( Pin
8-Nov-01 20:51
suss8-Nov-01 20:51 
GeneralRe: PLZ! Help this MFC newbie! Drawing a dragging rectangle; my code doesn't work :-( Pin
8-Nov-01 8:25
suss8-Nov-01 8:25 
GeneralOperator Pin
The_Server8-Nov-01 4:48
The_Server8-Nov-01 4:48 

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.