Click here to Skip to main content
15,943,089 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Executing Sort.exe using ShellExecute()... etc Pin
CPallini10-Nov-08 22:33
mveCPallini10-Nov-08 22:33 
AnswerRe: Executing Sort.exe using ShellExecute()... etc Pin
David Crow11-Nov-08 3:20
David Crow11-Nov-08 3:20 
Questionproblem creating a colored icon Pin
tudorbalan10-Nov-08 21:19
tudorbalan10-Nov-08 21:19 
AnswerRe: problem creating a colored icon [modified] Pin
Mark Salsbery11-Nov-08 6:56
Mark Salsbery11-Nov-08 6:56 
GeneralRe: problem creating a colored icon Pin
tudorbalan11-Nov-08 10:34
tudorbalan11-Nov-08 10:34 
GeneralRe: problem creating a colored icon Pin
Mark Salsbery11-Nov-08 11:28
Mark Salsbery11-Nov-08 11:28 
GeneralRe: problem creating a colored icon Pin
tudorbalan12-Nov-08 0:16
tudorbalan12-Nov-08 0:16 
GeneralRe: problem creating a colored icon Pin
Mark Salsbery12-Nov-08 6:58
Mark Salsbery12-Nov-08 6:58 
I'm not sure what's wrong.

I extended my test with a listview control.

Here's the code:
// My list control (m_ListCtrl) has the following styles:
//    LVS_REPORT | LVS_SHAREIMAGELISTS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP

    m_cImageListSmall.Create(16, 16, ILC_COLOR32|ILC_MASK, 1, 1);
    // AND mask - monochrome -  determines which pixels get drawn
    BYTE AND[32];
    for( int i=0; i<32; i++ )
    {
        AND[i] = 0xFF;
    }
    // XOR mask - 32bpp ARGB -  determines the pixel values
    DWORD XOR[256];
    for( int i=0; i<256; i++ )
    {
        XOR[i] = 0xFFFF0000;
    }
    HICON icon = ::CreateIcon(NULL,16,16,1,32,AND,(BYTE*)XOR);
    m_cImageListSmall.Add(icon);


    m_ListCtrl.SetImageList(&m_cImageListSmall, LVSIL_SMALL);

    m_ListCtrl.SetExtendedStyle(LVS_EX_FULLROWSELECT);
    m_ListCtrl.InsertColumn(0, _T("Column"), LVCFMT_LEFT, 100);
    m_ListCtrl.InsertItem(10, _T("aaaaaa"), 0);
    m_ListCtrl.InsertItem(10, _T("cccccc"), 0);
    m_ListCtrl.InsertItem(10, _T("eeeeee"), 0);
    m_ListCtrl.InsertItem(10, _T("bbbbbb"), 0);
    m_ListCtrl.InsertItem(10, _T("dddddd"), 0);

All the items have a red icon as expected.

Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: problem creating a colored icon Pin
tudorbalan12-Nov-08 8:52
tudorbalan12-Nov-08 8:52 
GeneralRe: problem creating a colored icon Pin
Mark Salsbery12-Nov-08 8:58
Mark Salsbery12-Nov-08 8:58 
Questionproblem in retriving values from recordset Pin
tasumisra10-Nov-08 20:47
tasumisra10-Nov-08 20:47 
AnswerRe: problem in retriving values from recordset Pin
CPallini10-Nov-08 21:14
mveCPallini10-Nov-08 21:14 
GeneralRe: problem in retriving values from recordset Pin
tasumisra10-Nov-08 21:23
tasumisra10-Nov-08 21:23 
GeneralRe: problem in retriving values from recordset Pin
CPallini10-Nov-08 21:48
mveCPallini10-Nov-08 21:48 
QuestionText Color Change for CRichEditCtrl on a CMdiChildWnd Pin
prithaa10-Nov-08 20:44
prithaa10-Nov-08 20:44 
AnswerRe: Text Color Change for CRichEditCtrl on a CMdiChildWnd Pin
Dhiraj kumar Saini10-Nov-08 22:33
Dhiraj kumar Saini10-Nov-08 22:33 
GeneralRe: Text Color Change for CRichEditCtrl on a CMdiChildWnd Pin
prithaa11-Nov-08 1:10
prithaa11-Nov-08 1:10 
QuestionIs there any API for Data? Pin
Nandu_77b10-Nov-08 20:20
Nandu_77b10-Nov-08 20:20 
AnswerRe: Is there any API for Data? Pin
_AnsHUMAN_ 10-Nov-08 20:39
_AnsHUMAN_ 10-Nov-08 20:39 
GeneralRe: Is there any API for Data? Pin
kevinmengmsn10-Nov-08 22:10
kevinmengmsn10-Nov-08 22:10 
GeneralRe: Is there any API for Data? Pin
_AnsHUMAN_ 10-Nov-08 22:43
_AnsHUMAN_ 10-Nov-08 22:43 
QuestionRe: Is there any API for Data? Pin
Nandu_77b10-Nov-08 23:14
Nandu_77b10-Nov-08 23:14 
AnswerRe: Is there any API for Data? Pin
Saurabh.Garg10-Nov-08 21:15
Saurabh.Garg10-Nov-08 21:15 
Questionhelp! How to ceate a custom skin application Pin
petterroea10-Nov-08 19:50
petterroea10-Nov-08 19:50 
AnswerRe: help! How to ceate a custom skin application Pin
enhzflep10-Nov-08 19:55
enhzflep10-Nov-08 19:55 

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.