Click here to Skip to main content
15,884,083 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhat does (need to clear the background) mean? Pin
JoneLe8619-Jul-13 8:33
JoneLe8619-Jul-13 8:33 
QuestionRe: What does (need to clear the background) mean? Pin
David Crow19-Jul-13 9:25
David Crow19-Jul-13 9:25 
AnswerRe: What does (need to clear the background) mean? Pin
JoneLe8619-Jul-13 10:28
JoneLe8619-Jul-13 10:28 
GeneralRe: What does (need to clear the background) mean? Pin
David Crow19-Jul-13 10:39
David Crow19-Jul-13 10:39 
GeneralRe: What does (need to clear the background) mean? Pin
JoneLe8619-Jul-13 13:46
JoneLe8619-Jul-13 13:46 
GeneralRe: What does (need to clear the background) mean? Pin
David Crow19-Jul-13 13:51
David Crow19-Jul-13 13:51 
AnswerRe: What does (need to clear the background) mean? Pin
Jochen Arndt19-Jul-13 22:04
professionalJochen Arndt19-Jul-13 22:04 
GeneralRe: What does (need to clear the background) mean? Pin
JoneLe8620-Jul-13 11:14
JoneLe8620-Jul-13 11:14 
Thanks for this info..

You must fill the cell rect with the background color before drawing the text.

SetBkColor(lpCD->nmcd.hdc, GetBkColor());
ExtTextOut(lpCD->nmcd.hdc, 0, 0, ETO_OPAQUE, &iR, NULL, 0, NULL);

but may function looks like this

fillrect(); //i am using this to fill out the specific rect
settextcolor(); //then I set the text color
Drawtext() //then I draw the text

(1)
if use ExtTextOut then there is no need to drawtext?

ExtTextOut(lpCD->nmcd.hdc, 0, 0, ETO_OPAQUE, &iR, Buffer, strlen(Buffer), NULL);

(2)
i used SetBkColor(lpCD->nmcd.hdc, GetBkColor(..)); nothing happened, i do not set a bk color in my listview, i did set a row color manually... so If I do SetBkColor(lpCD->nmcd.hdc, RGB(255,0,0)); the whole list bk changed to red?

maybe the method i use is wrong..
GeneralRe: What does (need to clear the background) mean? Pin
Jochen Arndt20-Jul-13 23:26
professionalJochen Arndt20-Jul-13 23:26 
GeneralRe: What does (need to clear the background) mean? Pin
JoneLe8624-Aug-13 9:34
JoneLe8624-Aug-13 9:34 
SuggestionRe: What does (need to clear the background) mean? Pin
Richard MacCutchan19-Jul-13 22:09
mveRichard MacCutchan19-Jul-13 22:09 
Suggestionerror C2039: 'DebugString' : is not a member of '_DEBUG_EVENT' Pin
ForNow19-Jul-13 4:46
ForNow19-Jul-13 4:46 
GeneralRe: error C2039: 'DebugString' : is not a member of '_DEBUG_EVENT' Pin
Richard MacCutchan19-Jul-13 5:00
mveRichard MacCutchan19-Jul-13 5:00 
GeneralRe: error C2039: 'DebugString' : is not a member of '_DEBUG_EVENT' Pin
ForNow19-Jul-13 5:32
ForNow19-Jul-13 5:32 
QuestionHow can I move CProgressCtrl in CListCtrl? Pin
YannGEF18-Jul-13 22:44
YannGEF18-Jul-13 22:44 
Questiontexture2D stretch Pin
boxfile18-Jul-13 22:29
boxfile18-Jul-13 22:29 
AnswerRe: texture2D stretch Pin
boxfile26-Jul-13 16:40
boxfile26-Jul-13 16:40 
Questionhook game for d3d10 or d3d11 Pin
boxfile18-Jul-13 16:36
boxfile18-Jul-13 16:36 
AnswerRe: hook game for d3d10 or d3d11 Pin
boxfile18-Jul-13 19:47
boxfile18-Jul-13 19:47 
QuestionCalling GUI functions from a worker thread in MFC?? Pin
Kiran Satish18-Jul-13 9:25
Kiran Satish18-Jul-13 9:25 
AnswerRe: Calling GUI functions from a worker thread in MFC?? Pin
pasztorpisti18-Jul-13 11:39
pasztorpisti18-Jul-13 11:39 
GeneralRe: Calling GUI functions from a worker thread in MFC?? Pin
«_Superman_»18-Jul-13 21:25
professional«_Superman_»18-Jul-13 21:25 
GeneralRe: Calling GUI functions from a worker thread in MFC?? Pin
pasztorpisti18-Jul-13 22:56
pasztorpisti18-Jul-13 22:56 
GeneralRe: Calling GUI functions from a worker thread in MFC?? Pin
Kiran Satish19-Jul-13 10:46
Kiran Satish19-Jul-13 10:46 
GeneralRe: Calling GUI functions from a worker thread in MFC?? Pin
pasztorpisti19-Jul-13 14:01
pasztorpisti19-Jul-13 14:01 

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.