Click here to Skip to main content
15,885,792 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CAsyncSocket exception Pin
Orjan Westin12-Feb-13 23:04
professionalOrjan Westin12-Feb-13 23:04 
GeneralRe: CAsyncSocket exception Pin
ForNow13-Feb-13 6:10
ForNow13-Feb-13 6:10 
Questiondisabele right click popup menu in win32 browser control Pin
venkatesh5286712-Feb-13 19:30
venkatesh5286712-Feb-13 19:30 
AnswerRe: disabele right click popup menu in win32 browser control Pin
_AnsHUMAN_ 13-Feb-13 2:35
_AnsHUMAN_ 13-Feb-13 2:35 
GeneralRe: disabele right click popup menu in win32 browser control Pin
venkatesh5286713-Feb-13 3:41
venkatesh5286713-Feb-13 3:41 
AnswerRe: disabele right click popup menu in win32 browser control Pin
Stephen Hewitt13-Feb-13 21:49
Stephen Hewitt13-Feb-13 21:49 
QuestionHow to retain row color while highlighting in Clist control Pin
HareeshaK12-Feb-13 16:33
HareeshaK12-Feb-13 16:33 
AnswerRe: How to retain row color while highlighting in Clist control Pin
Jochen Arndt12-Feb-13 22:48
professionalJochen Arndt12-Feb-13 22:48 
The colors set in a custom draw handler for CListCtrls are ignored for selected and hot items. With classic styles, the system uses COLOR_HIGHLIGHTTEXT for selected items. If you want to use other colors for selected and hot items, you must draw the items yourself and set the custom draw handler result to CDRF_SKIPDEFAULT:
C++
void CMyListCtrl::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult)
{
    *pResult = CDRF_DODEFAULT;
    LPNMLVCUSTOMDRAW lplvcd = reinterpret_cast<LPNMLVCUSTOMDRAW>(pNMHDR);
    switch (lplvcd->nmcd.dwDrawStage)
    {
    case CDDS_PREPAINT :                    // first message at begin of each paint cycle
        *pResult = CDRF_NOTIFYITEMDRAW;     // notify of item specific paint operations
        break;
    case CDDS_ITEMPREPAINT :                // triggered by returning CDRF_NOTIFYITEMDRAW from CDDS_PREPAINT
        *pResult = CDRF_NOTIFYSUBITEMDRAW;  // handle each subitem seperately
        break;
    case CDDS_ITEMPREPAINT | CDDS_SUBITEM : // triggered by CDRF_NOTIFYSUBITEMDRAW from CDDS_ITEMPREPAINT
        // The colors set here are ignored for selected and hot items.
        if (IsSelected(lplvcd->nmcd.dwItemSpec))
        {
            // Function that draws the cell content
            DrawCell(lplvcd, COLOR_HIGHLIGHTTEXT);
            *pResult = CDRF_SKIPDEFAULT;    // skip it, has just been drawn
        }
        else
        {
            // May set text and background color here
        }
        break;
    }
}

This example is for a report style list control.
Questionx86 build Pin
john563212-Feb-13 3:56
john563212-Feb-13 3:56 
QuestionRe: x86 build Pin
David Crow12-Feb-13 4:49
David Crow12-Feb-13 4:49 
AnswerRe: x86 build Pin
Albert Holguin12-Feb-13 5:27
professionalAlbert Holguin12-Feb-13 5:27 
QuestionSetupDiEnumDeviceInterfaces not Working. Pin
002comp11-Feb-13 21:49
002comp11-Feb-13 21:49 
AnswerRe: SetupDiEnumDeviceInterfaces not Working. Pin
002comp11-Feb-13 22:10
002comp11-Feb-13 22:10 
SuggestionRe: SetupDiEnumDeviceInterfaces not Working. Pin
Albert Holguin12-Feb-13 5:30
professionalAlbert Holguin12-Feb-13 5:30 
GeneralRe: SetupDiEnumDeviceInterfaces not Working. Pin
002comp12-Feb-13 19:49
002comp12-Feb-13 19:49 
QuestionHow to control the volume Programitacally in C/C++? Pin
sravanthi peddi11-Feb-13 18:22
sravanthi peddi11-Feb-13 18:22 
AnswerRe: How to control the volume Programitacally in C/C++? Pin
Jibesh11-Feb-13 21:12
professionalJibesh11-Feb-13 21:12 
QuestionHow to change master volume programmatically? Pin
sairam47711-Feb-13 18:15
sairam47711-Feb-13 18:15 
AnswerRe: How to change master volume programmatically? Pin
Jibesh11-Feb-13 21:11
professionalJibesh11-Feb-13 21:11 
AnswerRe: How to change master volume programmatically? Pin
David Crow12-Feb-13 5:40
David Crow12-Feb-13 5:40 
Questionwin32 dialogbox Pin
venkatesh5286711-Feb-13 6:47
venkatesh5286711-Feb-13 6:47 
AnswerRe: win32 dialogbox Pin
Jibesh11-Feb-13 6:57
professionalJibesh11-Feb-13 6:57 
QuestionRe: win32 dialogbox Pin
«_Superman_»11-Feb-13 18:03
professional«_Superman_»11-Feb-13 18:03 
AnswerRe: win32 dialogbox Pin
venkatesh5286711-Feb-13 20:37
venkatesh5286711-Feb-13 20:37 
GeneralRe: win32 dialogbox Pin
«_Superman_»11-Feb-13 20:47
professional«_Superman_»11-Feb-13 20:47 

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.