Click here to Skip to main content
15,896,063 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to find the path of my current running application [modified] Pin
Nelek28-Oct-07 23:15
protectorNelek28-Oct-07 23:15 
GeneralRe: How to find the path of my current running application Pin
chandu00426-Oct-07 1:06
chandu00426-Oct-07 1:06 
GeneralRe: How to find the path of my current running application Pin
Jonathan [Darka]26-Oct-07 1:19
professionalJonathan [Darka]26-Oct-07 1:19 
GeneralRe: How to find the path of my current running application Pin
chandu00426-Oct-07 1:56
chandu00426-Oct-07 1:56 
GeneralRe: How to find the path of my current running application Pin
ThatsAlok28-Oct-07 22:12
ThatsAlok28-Oct-07 22:12 
QuestionSPY++ Pin
Imtiaz Murtaza26-Oct-07 0:25
Imtiaz Murtaza26-Oct-07 0:25 
AnswerRe: SPY++ Pin
Karismatic26-Oct-07 0:30
Karismatic26-Oct-07 0:30 
QuestionCListCtrl problem, let it show color 1 in odd row and color 2 in even row Pin
fantasy121525-Oct-07 23:54
fantasy121525-Oct-07 23:54 
I've learned some code and idea from others, I can achieve my goal by mapping the message ON_WM_DRAWITEM, and override the method
void CMyListCtrl::DrawItem(somecode)
But I have no idea when does my CMyListCtrl trigger the DrawItem? Even I add the code AfxMessageBox(_T("tell me you DrawItem")); in void CMyListCtrl::DrawItem(somecode), it doesn't kick my ass at all. I am so confused.
My ideas got from others,
// Draw the background color<br />
	if( bHighlight )<br />
	{<br />
		pDC->SetTextColor(::GetSysColor(COLOR_HIGHLIGHTTEXT));<br />
		pDC->SetBkColor(::GetSysColor(COLOR_HIGHLIGHT));<br />
<br />
		pDC->FillRect(rcHighlight, &CBrush(::GetSysColor(COLOR_HIGHLIGHT)));<br />
	}<br />
	else<br />
	{<br />
		CRect rcClient, rcRow = rcItem;<br />
		GetClientRect(&rcClient);<br />
		rcRow.right = rcClient.right;<br />
<br />
		pDC->FillRect(rcRow, &CBrush(nItem%2 ? ::GetSysColor(COLOR_WINDOW) :<br />
	 					RGB(255,255,0)));<br />
	}<br />

So I thick I just need some demo code to teach me. Does Anybody kind to make a demo project implementing that: in the list control, in the odd row, fill color 1, but in the even row, fill color2.
pDC->FillRect(rcRow, &CBrush(nItem%2 ? ::GetSysColor(COLOR_WINDOW) :
	 					RGB(255,255,0)));

is what I want actually.
Do I describe my problem clearly?
AnswerRe: CListCtrl problem, let it show color 1 in odd row and color 2 in even row Pin
_AnsHUMAN_ 26-Oct-07 1:12
_AnsHUMAN_ 26-Oct-07 1:12 
QuestionBeep Pin
mcsherry25-Oct-07 23:46
mcsherry25-Oct-07 23:46 
AnswerRe: Beep Pin
_AnsHUMAN_ 26-Oct-07 1:30
_AnsHUMAN_ 26-Oct-07 1:30 
Questionhow to monitor exe and dll interactions? Pin
George_George25-Oct-07 23:09
George_George25-Oct-07 23:09 
AnswerRe: how to monitor exe and dll interactions? Pin
Jonathan [Darka]26-Oct-07 0:59
professionalJonathan [Darka]26-Oct-07 0:59 
GeneralRe: how to monitor exe and dll interactions? Pin
George_George26-Oct-07 6:44
George_George26-Oct-07 6:44 
GeneralRe: how to monitor exe and dll interactions? Pin
Jonathan [Darka]26-Oct-07 13:03
professionalJonathan [Darka]26-Oct-07 13:03 
GeneralRe: how to monitor exe and dll interactions? Pin
George_George26-Oct-07 21:20
George_George26-Oct-07 21:20 
QuestionGetting active and past local users of system Pin
Subhash Karemore25-Oct-07 22:56
Subhash Karemore25-Oct-07 22:56 
QuestionRe: Getting active and past local users of system Pin
David Crow26-Oct-07 2:58
David Crow26-Oct-07 2:58 
AnswerRe: Getting active and past local users of system Pin
Subhash Karemore1-Nov-07 4:14
Subhash Karemore1-Nov-07 4:14 
GeneralRe: Getting active and past local users of system Pin
David Crow1-Nov-07 4:22
David Crow1-Nov-07 4:22 
QuestionGetting PID of process of network sockets(TCP, UDP) on windows 2000 Pin
Subhash Karemore25-Oct-07 22:53
Subhash Karemore25-Oct-07 22:53 
Questiondirectories in combo box Pin
guru moorthy.k25-Oct-07 22:19
guru moorthy.k25-Oct-07 22:19 
AnswerRe: directories in combo box Pin
Peter Weyzen25-Oct-07 22:24
Peter Weyzen25-Oct-07 22:24 
AnswerRe: directories in combo box Pin
ThatsAlok28-Oct-07 19:51
ThatsAlok28-Oct-07 19:51 
Questionthe Fun IsUserAnAdmin() fails on Windows Vista Pin
junkMind25-Oct-07 21:27
junkMind25-Oct-07 21:27 

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.