Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
B

Bengi

@Bengi
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ListView Colors..weird
    B Bengi

    any idea? i kinda need this one fixed badly! /- Bengi - \

    C / C++ / MFC c++ json question

  • ListView Colors..weird
    B Bengi

    Anyone knows a reason why this would not paint my items/sub items ?

    case WM_NOTIFY:
    {
    switch(LOWORD(wParam))
    {
    case IDC_LIST:
    {
    if(((LPNMHDR)lParam)->code == NM_CUSTOMDRAW)
    {
    NMLVCUSTOMDRAW *cdraw = (NMLVCUSTOMDRAW*)lParam;

                 if (cdraw->nmcd.dwDrawStage == CDDS\_PREPAINT)
                     return CDRF\_NOTIFYITEMDRAW;
    
                 if (cdraw->nmcd.dwDrawStage == CDDS\_ITEMPREPAINT || cdraw->nmcd.dwDrawStage == CDDS\_SUBITEM)
                 {      
                    COLORREF crText;
                            
                     if ( cdraw->iSubItem==2 )
                          crText = RGB(255,0,0);
                     else if ( cdraw->iSubItem==1 )
                          crText = RGB(0,255,0);
                     else
                          crText = RGB(128,128,255);
                            
                     cdraw->clrText = crText;
                            
                     return CDRF\_DODEFAULT;
                 }
                        
              }
    }
    }	
    

    }

    the message never arrives at if (cdraw->nmcd.dwDrawStage == CDDS_ITEMPREPAINT || cdraw->nmcd.dwDrawStage == CDDS_SUBITEM) i have seen other src codes and it all works well there (MFC examples but not API) any brief idea? /- Bengi - \

    C / C++ / MFC c++ json question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups