Click here to Skip to main content
15,903,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: problem with sprintf_s() on win 7 Pin
Sarath C5-Nov-12 22:14
Sarath C5-Nov-12 22:14 
AnswerRe: problem with sprintf_s() on win 7 Pin
Member 935377613-Nov-12 22:48
Member 935377613-Nov-12 22:48 
Questionhow to get motherboard SN Pin
buffay1-Nov-12 19:42
buffay1-Nov-12 19:42 
AnswerRe: how to get motherboard SN Pin
Richard MacCutchan2-Nov-12 0:37
mveRichard MacCutchan2-Nov-12 0:37 
QuestionChart Control Pin
Tom Paronis1-Nov-12 6:04
Tom Paronis1-Nov-12 6:04 
AnswerRe: Chart Control Pin
Richard MacCutchan1-Nov-12 6:48
mveRichard MacCutchan1-Nov-12 6:48 
GeneralRe: Chart Control Pin
Tom Paronis1-Nov-12 7:34
Tom Paronis1-Nov-12 7:34 
QuestionCopy CDC Pin
_Flaviu31-Oct-12 22:29
_Flaviu31-Oct-12 22: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 1:38
Santhosh G_1-Nov-12 1:38 
GeneralRe: Copy CDC Pin
_Flaviu1-Nov-12 2:20
_Flaviu1-Nov-12 2:20 
QuestionStrange memory leak Pin
miniman0631-Oct-12 21:58
miniman0631-Oct-12 21:58 
AnswerRe: Strange memory leak Pin
Sivaraman Dhamodharan31-Oct-12 22:45
Sivaraman Dhamodharan31-Oct-12 22:45 
GeneralRe: Strange memory leak Pin
miniman0631-Oct-12 23:10
miniman0631-Oct-12 23:10 
AnswerRe: Strange memory leak Pin
Rolf Kristensen31-Oct-12 22:47
Rolf Kristensen31-Oct-12 22:47 
GeneralRe: Strange memory leak Pin
miniman0631-Oct-12 23:11
miniman0631-Oct-12 23:11 
AnswerRe: Strange memory leak Pin
Santhosh G_31-Oct-12 23:22
Santhosh G_31-Oct-12 23:22 
GeneralRe: Strange memory leak Pin
miniman0631-Oct-12 23:31
miniman0631-Oct-12 23:31 
AnswerRe: Strange memory leak Pin
Jochen Arndt31-Oct-12 23:35
professionalJochen Arndt31-Oct-12 23:35 
GeneralRe: Strange memory leak Pin
miniman061-Nov-12 0:09
miniman061-Nov-12 0:09 
GeneralRe: Strange memory leak Pin
Jochen Arndt1-Nov-12 0:29
professionalJochen Arndt1-Nov-12 0:29 
AnswerRe: Strange memory leak Pin
BCN-1631-Nov-12 16:01
BCN-1631-Nov-12 16:01 
Questionabout accessing PDF file, compile error. Pin
BCN-16331-Oct-12 15:18
BCN-16331-Oct-12 15:18 
AnswerRe: about accessing PDF file, compile error. Pin
Richard MacCutchan31-Oct-12 23:41
mveRichard MacCutchan31-Oct-12 23:41 
GeneralRe: about accessing PDF file, compile error. Pin
BCN-1631-Nov-12 15:56
BCN-1631-Nov-12 15:56 
GeneralRe: about accessing PDF file, compile error. Pin
Richard MacCutchan1-Nov-12 22:35
mveRichard MacCutchan1-Nov-12 22: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.