Click here to Skip to main content
15,901,205 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Conversion using "reinterpret_cast" in VC++ 2005 Pin
Mark Salsbery8-Aug-07 5:48
Mark Salsbery8-Aug-07 5:48 
GeneralRe: Conversion using "reinterpret_cast" in VC++ 2005 Pin
KarstenK8-Aug-07 3:52
mveKarstenK8-Aug-07 3:52 
QuestionRe: [Message Deleted] Pin
Hamid_RT8-Aug-07 6:55
Hamid_RT8-Aug-07 6:55 
QuestionHow to change back ground color of a toolbar? Pin
Hadi Dayvary8-Aug-07 1:20
professionalHadi Dayvary8-Aug-07 1:20 
AnswerRe: How to change back ground color of a toolbar? Pin
Mark Salsbery8-Aug-07 5:50
Mark Salsbery8-Aug-07 5:50 
QuestionSetting Connection TimeOut in ODBC 3.x Pin
Rajesh_Parameswaran8-Aug-07 0:39
Rajesh_Parameswaran8-Aug-07 0:39 
AnswerRe: Setting Connection TimeOut in ODBC 3.x Pin
tuxyboy9-Aug-07 3:22
tuxyboy9-Aug-07 3:22 
QuestionList Contorl color Pin
Kiran Pinjala8-Aug-07 0:35
Kiran Pinjala8-Aug-07 0:35 
I want to change a perticular row color at some event.
so i used
OnCustomdrawMyList(NMHDR *pNMHDR,LRESULT *pResult)

in its definition i wrote
  else if ( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
{
        // This is the prepaint stage for an item. Here's where we set the
        // item's text color. Our return value will tell Windows to draw the
        // item itself, but it will use the new color we set here.
        // We'll cycle the colors through red, green, and light blue.

        COLORREF crText;
		if((pLVCD->nmcd.dwItemSpec % 3) == 0)
		{
			switch(app->RowColor)
			{
			case COLRED:
				crText = RGB(200,0,0);
				break;
			case COLGREEN:
				crText = RGB(0,170,0);
				break;
			case COLORANGE:
				crText = RGB(255,128,66);
			default:
				crText = RGB(200,0,0);
			}

			pLVCD->clrText = crText;
			// Tell Windows to paint the control itself.
			*pResult = CDRF_DODEFAULT;
		}
}


it works fine it the total number of rows are 3. If there are more than 3 rows, and if i am executing the code ( my expectation from this code is to change the color of the first row.) 0th row,4th row,8th row... are being changed their colors.

Why is it happening like that. Is there any solution for this?

KIRAN PINJARLA

QuestionRe: List Contorl color Pin
David Crow8-Aug-07 2:33
David Crow8-Aug-07 2:33 
AnswerRe: List Contorl color Pin
Kiran Pinjala8-Aug-07 2:47
Kiran Pinjala8-Aug-07 2:47 
QuestionTo Enable/Disable all controls in group box with a single call? Pin
Mushtaque Nizamani8-Aug-07 0:20
Mushtaque Nizamani8-Aug-07 0:20 
AnswerRe: To Enable/Disable all controls in group box with a single call? Pin
sw@thi8-Aug-07 0:47
sw@thi8-Aug-07 0:47 
AnswerRe: To Enable/Disable all controls in group box with a single call? Pin
toxcct8-Aug-07 1:32
toxcct8-Aug-07 1:32 
AnswerRe: To Enable/Disable all controls in group box with a single call? Pin
David Crow8-Aug-07 2:35
David Crow8-Aug-07 2:35 
QuestionString casting Pin
baerten7-Aug-07 23:54
baerten7-Aug-07 23:54 
AnswerRe: String casting Pin
jk chan7-Aug-07 23:57
jk chan7-Aug-07 23:57 
AnswerRe: String casting Pin
toxcct8-Aug-07 0:06
toxcct8-Aug-07 0:06 
GeneralRe: String casting Pin
baerten8-Aug-07 0:12
baerten8-Aug-07 0:12 
AnswerRe: String casting Pin
Nishad S8-Aug-07 0:11
Nishad S8-Aug-07 0:11 
AnswerRe: String casting Pin
Member 43990948-Aug-07 2:01
Member 43990948-Aug-07 2:01 
GeneralRe: String casting Pin
baerten8-Aug-07 2:04
baerten8-Aug-07 2:04 
QuestionProblem while trying to mix the input level of a sound card input Pin
djin947-Aug-07 23:41
djin947-Aug-07 23:41 
QuestionDisable SSL cert. warning dialog in webbrowser control Pin
rrrado7-Aug-07 23:22
rrrado7-Aug-07 23:22 
AnswerRe: Disable SSL cert. warning dialog in webbrowser control Pin
jk chan7-Aug-07 23:58
jk chan7-Aug-07 23:58 
GeneralRe: Disable SSL cert. warning dialog in webbrowser control Pin
rrrado8-Aug-07 4:20
rrrado8-Aug-07 4:20 

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.