Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: memory mapped Pin
Niklas L21-Mar-11 2:06
Niklas L21-Mar-11 2:06 
QuestionHelp Microsoft Scripting Runtime Pin
goldenrose97-Mar-11 1:30
goldenrose97-Mar-11 1:30 
AnswerRe: Help Microsoft Scripting Runtime Pin
KingsGambit7-Mar-11 17:12
KingsGambit7-Mar-11 17:12 
Questionambiguous call to overloaded function.. but, it's not overloaded or ambiguous Pin
tukbriz7-Mar-11 0:49
tukbriz7-Mar-11 0:49 
AnswerRe: ambiguous call to overloaded function.. but, it's not overloaded or ambiguous Pin
Niklas L7-Mar-11 1:15
Niklas L7-Mar-11 1:15 
GeneralRe: ambiguous call to overloaded function.. but, it's not overloaded or ambiguous Pin
tukbriz8-Mar-11 3:13
tukbriz8-Mar-11 3:13 
AnswerRe: ambiguous call to overloaded function.. but, it's not overloaded or ambiguous Pin
Cool_Dev7-Mar-11 1:30
Cool_Dev7-Mar-11 1:30 
Questionchange highlight color of ClistCtrl when it not in focus Pin
xanagan6666-Mar-11 23:34
xanagan6666-Mar-11 23:34 
I have a problem about trying to change the color of selected/hilight row of CMFCListCtrl/CListCtrl when they are not in focus.

the control are already set with "full row select" styles

On windows xp or classic theme there is no problem.

but when using aero theme (both vista and 7) the color of selected row when it doesn't have a focus is a "very" light grey (opposed to darkgrey on old version of windows/classic theme)
that absolutely cannot be seen on my Laptop screen/LCD/50 inch HDTV.

I tried to implement the color changing by using custom draw but look like it impossible to change the selected cell/row color (only unselected cell/row color can be change). or it already
changed but the system draw the default selected background after custom draw,I dont know.

Please help me if anyone know the solution without resorting to full owner drawn implement (I dont have that much experience to recreate all the drawing code).

this is my current attemp which didn't work

void CMyListCtrl::OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult)
{

 LPNMLVCUSTOMDRAW lpLVCustomDraw = reinterpret_cast<LPNMLVCUSTOMDRAW>(pNMHDR);

  switch(lpLVCustomDraw->nmcd.dwDrawStage)
  {
    case CDDS_ITEMPREPAINT:
    case CDDS_ITEMPREPAINT | CDDS_SUBITEM:
		
		//change the background of selected row to black
		if(this->GetItemState(lpLVCustomDraw->nmcd.dwItemSpec,LVIS_SELECTED) & LVIS_SELECTED){
			 lpLVCustomDraw->clrTextBk = RGB(0,0,0);
		}

    break;

    default: break;    
  }

  *pResult = 0;
  *pResult |= CDRF_NOTIFYPOSTPAINT;
  *pResult |= CDRF_NOTIFYITEMDRAW;
  *pResult |= CDRF_NOTIFYSUBITEMDRAW;

}

AnswerRe: change highlight color of ClistCtrl when it not in focus Pin
Roger Broomfield7-Mar-11 0:35
Roger Broomfield7-Mar-11 0:35 
GeneralRe: change highlight color of ClistCtrl when it not in focus Pin
xanagan6667-Mar-11 4:47
xanagan6667-Mar-11 4:47 
GeneralRe: change highlight color of ClistCtrl when it not in focus Pin
Roger Broomfield7-Mar-11 12:53
Roger Broomfield7-Mar-11 12:53 
QuestionHow can write sheet 2 in xlsx with excel automation? Pin
Le@rner6-Mar-11 18:29
Le@rner6-Mar-11 18:29 
AnswerRe: How can write sheet 2 in xlsx with excel automation? Pin
Roger Broomfield7-Mar-11 1:34
Roger Broomfield7-Mar-11 1:34 
GeneralRe: How can write sheet 2 in xlsx with excel automation? Pin
Le@rner7-Mar-11 1:57
Le@rner7-Mar-11 1:57 
GeneralRe: How can write sheet 2 in xlsx with excel automation? Pin
Roger Broomfield7-Mar-11 4:36
Roger Broomfield7-Mar-11 4:36 
GeneralRe: How can write sheet 2 in xlsx with excel automation? [modified] Pin
Le@rner7-Mar-11 17:22
Le@rner7-Mar-11 17:22 
GeneralRe: How can write sheet 2 in xlsx with excel automation? Pin
Roger Broomfield7-Mar-11 20:34
Roger Broomfield7-Mar-11 20:34 
GeneralRe: How can write sheet 2 in xlsx with excel automation? [modified] Pin
Le@rner7-Mar-11 21:03
Le@rner7-Mar-11 21:03 
GeneralRe: How can write sheet 2 in xlsx with excel automation? Pin
Roger Broomfield7-Mar-11 21:30
Roger Broomfield7-Mar-11 21:30 
GeneralRe: How can write sheet 2 in xlsx with excel automation? [modified] Pin
Le@rner7-Mar-11 21:42
Le@rner7-Mar-11 21:42 
Questionencode char? Pin
Nguyen Sy Bang6-Mar-11 17:55
Nguyen Sy Bang6-Mar-11 17:55 
QuestionVS 2008 Configuration For Libraries Pin
Mike Certini6-Mar-11 17:53
Mike Certini6-Mar-11 17:53 
AnswerRe: VS 2008 Configuration For Libraries Pin
Michael Dunn6-Mar-11 18:12
sitebuilderMichael Dunn6-Mar-11 18:12 
GeneralRe: VS 2008 Configuration For Libraries Pin
Mike Certini6-Mar-11 18:31
Mike Certini6-Mar-11 18:31 
GeneralRe: VS 2008 Configuration For Libraries Pin
tagopi6-Mar-11 19:53
tagopi6-Mar-11 19:53 

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.