Click here to Skip to main content
15,504,146 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: problem with sprintf_s() on win 7 Pin
Sarath C5-Nov-12 23:14
Sarath C5-Nov-12 23:14 
AnswerRe: problem with sprintf_s() on win 7 Pin
Member 935377613-Nov-12 23:48
Member 935377613-Nov-12 23:48 
Questionhow to get motherboard SN Pin
buffay1-Nov-12 20:42
buffay1-Nov-12 20:42 
AnswerRe: how to get motherboard SN Pin
Richard MacCutchan2-Nov-12 1:37
mveRichard MacCutchan2-Nov-12 1:37 
QuestionChart Control Pin
Tom Paronis1-Nov-12 7:04
Tom Paronis1-Nov-12 7:04 
AnswerRe: Chart Control Pin
Richard MacCutchan1-Nov-12 7:48
mveRichard MacCutchan1-Nov-12 7:48 
GeneralRe: Chart Control Pin
Tom Paronis1-Nov-12 8:34
Tom Paronis1-Nov-12 8:34 
QuestionCopy CDC Pin
_Flaviu31-Oct-12 23:29
_Flaviu31-Oct-12 23:29 
I have the follow code :

C++
CSize sizeDoc = pDoc->GetBitmapSize();
CDC MemDC, TempDC;
MemDC.CreateCompatibleDC(pDC);
TempDC.CreateCompatibleDC(pDC);
CBitmap* pOldBitmap = MemDC.SelectObject(&pDoc->GetBitmap());
pDC->SetStretchBltMode(HALFTONE);
TempDC.StretchBlt(0, 0, sizeLog.cx, sizeLog.cy, &MemDC, 0, 0, sizeDoc.cx, sizeDoc.cy, SRCCOPY);
pDC->StretchBlt(0, 0, sizeLog.cx, sizeLog.cy, &TempDC, 0, 0, sizeDoc.cx, sizeDoc.cy, SRCCOPY);
pDC->SelectObject(pOldBitmap);

and on view I see nothing ... what I'm doing wrong ? TempDC don't have the same structure like MemDC ? Because if I do so:
C++
	CSize sizeDoc = pDoc->GetBitmapSize();
	CDC MemDC, TempDC;
	MemDC.CreateCompatibleDC(pDC);
//	TempDC.CreateCompatibleDC(pDC);
	CBitmap* pOldBitmap = MemDC.SelectObject(&pDoc->GetBitmap());
	pDC->SetStretchBltMode(HALFTONE);
	pDC->StretchBlt(0, 0, sizeLog.cx, sizeLog.cy, &MemDC, 0, 0, sizeDoc.cx, sizeDoc.cy, SRCCOPY);
	pDC->SelectObject(pOldBitmap);

everything it's ok ...
AnswerRe: Copy CDC Pin
Santhosh G_1-Nov-12 2:38
Santhosh G_1-Nov-12 2:38 
GeneralRe: Copy CDC Pin
_Flaviu1-Nov-12 3:20
_Flaviu1-Nov-12 3:20 
QuestionStrange memory leak Pin
miniman0631-Oct-12 22:58
miniman0631-Oct-12 22:58 
AnswerRe: Strange memory leak Pin
Sivaraman Dhamodharan31-Oct-12 23:45
Sivaraman Dhamodharan31-Oct-12 23:45 
GeneralRe: Strange memory leak Pin
miniman061-Nov-12 0:10
miniman061-Nov-12 0:10 
AnswerRe: Strange memory leak Pin
Rolf Kristensen31-Oct-12 23:47
Rolf Kristensen31-Oct-12 23:47 
GeneralRe: Strange memory leak Pin
miniman061-Nov-12 0:11
miniman061-Nov-12 0:11 
AnswerRe: Strange memory leak Pin
Santhosh G_1-Nov-12 0:22
Santhosh G_1-Nov-12 0:22 
GeneralRe: Strange memory leak Pin
miniman061-Nov-12 0:31
miniman061-Nov-12 0:31 
AnswerRe: Strange memory leak Pin
Jochen Arndt1-Nov-12 0:35
professionalJochen Arndt1-Nov-12 0:35 
GeneralRe: Strange memory leak Pin
miniman061-Nov-12 1:09
miniman061-Nov-12 1:09 
GeneralRe: Strange memory leak Pin
Jochen Arndt1-Nov-12 1:29
professionalJochen Arndt1-Nov-12 1:29 
AnswerRe: Strange memory leak Pin
BCN-1631-Nov-12 17:01
BCN-1631-Nov-12 17:01 
Questionabout accessing PDF file, compile error. Pin
BCN-16331-Oct-12 16:18
BCN-16331-Oct-12 16:18 
AnswerRe: about accessing PDF file, compile error. Pin
Richard MacCutchan1-Nov-12 0:41
mveRichard MacCutchan1-Nov-12 0:41 
GeneralRe: about accessing PDF file, compile error. Pin
BCN-1631-Nov-12 16:56
BCN-1631-Nov-12 16:56 
GeneralRe: about accessing PDF file, compile error. Pin
Richard MacCutchan1-Nov-12 23:35
mveRichard MacCutchan1-Nov-12 23:35 

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.