Click here to Skip to main content
15,889,909 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Rookie Alert! Need Help Learning C Pin
MSTzhao2-Oct-11 21:34
MSTzhao2-Oct-11 21:34 
AnswerRe: Rookie Alert! Need Help Learning C Pin
Richard MacCutchan2-Oct-11 21:42
mveRichard MacCutchan2-Oct-11 21:42 
AnswerRe: Rookie Alert! Need Help Learning C Pin
ThatsAlok2-Oct-11 23:42
ThatsAlok2-Oct-11 23:42 
AnswerRe: Rookie Alert! Need Help Learning C Pin
TheGreatAndPowerfulOz3-Oct-11 7:22
TheGreatAndPowerfulOz3-Oct-11 7:22 
GeneralRe: Rookie Alert! Need Help Learning C Pin
Veeshal Beotra4-Oct-11 6:35
Veeshal Beotra4-Oct-11 6:35 
AnswerRe: Rookie Alert! Need Help Learning C Pin
Legor4-Oct-11 1:43
Legor4-Oct-11 1:43 
GeneralRe: Rookie Alert! Need Help Learning C Pin
Veeshal Beotra4-Oct-11 6:37
Veeshal Beotra4-Oct-11 6:37 
QuestionDrawing text issue Pin
csrss2-Oct-11 9:44
csrss2-Oct-11 9:44 
Hi all. I got a huge problem while trying to draw a text with MFC. So, i got my custom class which extends CStatic.
In OnPaint:

CPaintDC dc(this);
Gdiplus::Graphics * gfx = Gdiplus::Graphics::FromHDC(dc.GetSafeHdc());

// then there a couple of things ... and then i am drawing a text like that (in another function which takes as IN parameter Gdiplus::Graphics, created in OnPaint):

CDC * pDC = CDC::FromHandle(gfx->GetHDC());
pDC->TextOut(0, 0, "my text");
gfx->ReleaseHDC(pDC->GetSafeHdc());


Simple. But every time OnPaint gets called - new text is drawn over old one, so it is getting bolder and bolder. And, it is not like the old one never erased, but it is erased only when there are about 5 same texts drawn over each one.
Another thing, i've tried not to use Gdiplus at all - do everything only with CDC thing - same effect. Have used DrawText - same effect. Only with Gdiplus DrawString text is drawn correctly. But i need to draw it with Gdi32.

Thanks.
011011010110000101100011011010000110100101101110
0110010101110011

AnswerRe: Drawing text issue Pin
KingsGambit2-Oct-11 18:30
KingsGambit2-Oct-11 18:30 
GeneralRe: Drawing text issue Pin
csrss3-Oct-11 5:56
csrss3-Oct-11 5:56 
AnswerRe: Drawing text issue Pin
john56322-Oct-11 19:51
john56322-Oct-11 19:51 
GeneralRe: Drawing text issue Pin
csrss3-Oct-11 6:58
csrss3-Oct-11 6:58 
QuestionShow information in the same dialog after press diferent button Pin
antonio3432-Oct-11 6:23
antonio3432-Oct-11 6:23 
AnswerRe: Show information in the same dialog after press diferent button Pin
André Kraak2-Oct-11 7:06
André Kraak2-Oct-11 7:06 
AnswerRe: Show information in the same dialog after press diferent button Pin
Software_Developer2-Oct-11 10:24
Software_Developer2-Oct-11 10:24 
GeneralRe: Show information in the same dialog after press diferent button Pin
Richard MacCutchan2-Oct-11 22:57
mveRichard MacCutchan2-Oct-11 22:57 
GeneralRe: Show information in the same dialog after press diferent button Pin
Software_Developer2-Oct-11 23:44
Software_Developer2-Oct-11 23:44 
AnswerRe: Show information in the same dialog after press diferent button Pin
Richard MacCutchan2-Oct-11 21:35
mveRichard MacCutchan2-Oct-11 21:35 
GeneralRe: Show information in the same dialog after press diferent button Pin
antonio3432-Oct-11 22:01
antonio3432-Oct-11 22:01 
AnswerRe: Show information in the same dialog after press diferent button Pin
Madhu Nair2-Oct-11 22:11
Madhu Nair2-Oct-11 22:11 
GeneralRe: Show information in the same dialog after press diferent button Pin
antonio3432-Oct-11 22:45
antonio3432-Oct-11 22:45 
GeneralRe: Show information in the same dialog after press diferent button Pin
Richard MacCutchan2-Oct-11 22:59
mveRichard MacCutchan2-Oct-11 22:59 
GeneralRe: Show information in the same dialog after press diferent button Pin
antonio3432-Oct-11 23:10
antonio3432-Oct-11 23:10 
GeneralRe: Show information in the same dialog after press diferent button Pin
Richard MacCutchan2-Oct-11 23:45
mveRichard MacCutchan2-Oct-11 23:45 
GeneralRe: Show information in the same dialog after press diferent button Pin
antonio3433-Oct-11 4:45
antonio3433-Oct-11 4:45 

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.