Click here to Skip to main content
15,914,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralXP System Restore Pin
yqzq10-Aug-05 18:05
yqzq10-Aug-05 18:05 
GeneralRe: XP System Restore Pin
Supriya Tonape23-Aug-05 20:05
Supriya Tonape23-Aug-05 20:05 
GeneralList Subitem Background! Pin
LiYS10-Aug-05 17:59
LiYS10-Aug-05 17:59 
GeneralRe: List Subitem Background! Pin
Jose Lamas Rios10-Aug-05 18:10
Jose Lamas Rios10-Aug-05 18:10 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 18:34
LiYS10-Aug-05 18:34 
GeneralRe: List Subitem Background! Pin
Jose Lamas Rios10-Aug-05 19:54
Jose Lamas Rios10-Aug-05 19:54 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 20:36
LiYS10-Aug-05 20:36 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 20:46
LiYS10-Aug-05 20:46 
Here's the code snippet I used to populate the list control!
m_cListCtrl.DeleteAllItems();
m_cListCtrl.SetExtendedStyle(LVS_EX_SUBITEMIMAGES /*| LVS_EX_FULLROWSELECT*/); // line #2
m_cListCtrl.SetTextBkColor(CLR_NONE);

// Use the LV_ITEM structure to insert the items
LVITEM lvi;
CString strItem;
for (int i = 0; i < m_nItems; i++)
{
    // Insert the first item
    lvi.mask =  LVIF_IMAGE | LVIF_TEXT;
    strItem.Format(_T("Item %i"), i);

    lvi.iItem = i;
    lvi.iSubItem = 0;
    lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);
    lvi.iImage = i%8;       // There are 8 images in the image list
    m_cListCtrl.InsertItem(&lvi);

    // Set subitem 1
    strItem.Format(_T("%d"), 10*i);
    lvi.iSubItem =1;
    lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);
    lvi.iImage = i%8;
    m_cListCtrl.SetItem(&lvi);

    // Set subitem 2
    strItem.Format(_T("%s"), COleDateTime::GetCurrentTime().Format(_T("Created: %I:%M:%S %p, %m/%d/%Y")));
    lvi.iSubItem =2;
    lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);
    m_cListCtrl.SetItem(&lvi);

}


Leave the line #2 comment there transparency was gained, once comment out it, the subitem with icon is not tranparent!But the question is I want the both list properties!
Pls note: The system is not under default "window color"!
Same problem happens regardless what the system "window color" is!
GeneralRe: List Subitem Background! Pin
Jose Lamas Rios10-Aug-05 21:17
Jose Lamas Rios10-Aug-05 21:17 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 21:23
LiYS10-Aug-05 21:23 
GeneralRe: List Subitem Background! Pin
Jose Lamas Rios10-Aug-05 21:39
Jose Lamas Rios10-Aug-05 21:39 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 21:43
LiYS10-Aug-05 21:43 
GeneralNewbie need help..! Pin
cue_ball10-Aug-05 16:48
cue_ball10-Aug-05 16:48 
GeneralRe: Newbie need help..! Pin
Christian Graus10-Aug-05 16:53
protectorChristian Graus10-Aug-05 16:53 
GeneralRe: Newbie need help..! Pin
cue_ball10-Aug-05 16:59
cue_ball10-Aug-05 16:59 
GeneralRe: Newbie need help..! Pin
Christian Graus10-Aug-05 17:01
protectorChristian Graus10-Aug-05 17:01 
GeneralRe: Newbie need help..! Pin
cue_ball10-Aug-05 17:05
cue_ball10-Aug-05 17:05 
GeneralRe: Newbie need help..! Pin
Christian Graus10-Aug-05 17:06
protectorChristian Graus10-Aug-05 17:06 
GeneralRe: Newbie need help..! Pin
cue_ball10-Aug-05 17:10
cue_ball10-Aug-05 17:10 
GeneralRe: Newbie need help..! Pin
cue_ball11-Aug-05 19:57
cue_ball11-Aug-05 19:57 
GeneralWindows Service Pin
zhaopi10-Aug-05 16:44
zhaopi10-Aug-05 16:44 
GeneralRe: Windows Service Pin
Jose Lamas Rios10-Aug-05 17:23
Jose Lamas Rios10-Aug-05 17:23 
GeneralRe: Windows Service Pin
Garth J Lancaster10-Aug-05 17:30
professionalGarth J Lancaster10-Aug-05 17:30 
GeneralRe: Windows Service Pin
Jose Lamas Rios10-Aug-05 17:45
Jose Lamas Rios10-Aug-05 17:45 
GeneralRe: Windows Service Pin
Garth J Lancaster10-Aug-05 17:28
professionalGarth J Lancaster10-Aug-05 17:28 

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.