Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 7th, 2006, 05:13 AM
ehsanking ehsanking is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 207 ehsanking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 h 3 m 51 sec
Reputation Power: 4
Help coloring individual listview item instead of all listview item in visual c++

Hi all. i am using this code to change color of listview item.
But unfortunetly it goes and changes color of all item instead
of only changing the color selected listview item. Could an expert
look at this and show me how i can only change color of selected
listview item instead of coloring all items in listview.Thanks


Code:
 

void CColor1Dlg::OnButton1() 

{

HWND hPalWnd = ::FindWindow("my window class", NULL);

        HWND spilterwindow = FindWindowEx(hPalWnd, 0, "WTL_SplitterWindow", 0);

        spilterwindow = FindWindowEx(spilterwindow, 0, "WTL_SplitterWindow", 0);

        HWND ATL = FindWindowEx(spilterwindow, 0, "WTL_SplitterWindow", 0);

        HWND ATLWIN = FindWindowEx(ATL, 0, "atl:0053c8d0", 0);

        HWND Dialog = FindWindowEx(ATLWIN, 0, "SysListView32", 0);

        HWND Rich = FindWindowEx(Dialog, 0, "SysHeader32", 0);

 

            CButton *pButton1 = (CButton*)GetDlgItem(IDC_BUTTON1);

            COLORREF GetBkColor(IDC_BUTTON1);

            //COLORREF color = m_color.GetColor();

COLORREF color = 33023;

            TRACE("Color of the selected font = %8x\n", color);

            //CButton *pButton = (CButton*)GetDlgItem(IDC_BUTTON2);

            //pButton->SetWindowText("Shoot");

        ::SendMessage(Dialog, LVM_SETTEXTCOLOR, 0, color);

 

}

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Help coloring individual listview item instead of all listview item in visual c++


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway