Click here to Skip to main content
16,016,814 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual C++/MFC Thread Question Pin
Achim Klein11-Aug-05 2:47
Achim Klein11-Aug-05 2:47 
GeneralRe: Visual C++/MFC Thread Question Pin
koothkeeper11-Aug-05 3:46
professionalkoothkeeper11-Aug-05 3:46 
GeneralRe: Visual C++/MFC Thread Question Pin
Eytukan11-Aug-05 3:56
Eytukan11-Aug-05 3:56 
GeneralRe: Visual C++/MFC Thread Question Pin
Eytukan11-Aug-05 4:21
Eytukan11-Aug-05 4:21 
GeneralRe: Visual C++/MFC Thread Question Pin
ThatsAlok11-Aug-05 4:48
ThatsAlok11-Aug-05 4:48 
GeneralRe: Visual C++/MFC Thread Question Pin
Ravi Bhavnani11-Aug-05 11:08
professionalRavi Bhavnani11-Aug-05 11:08 
GeneralRe: Visual C++/MFC Thread Question Pin
suzie10011-Aug-05 13:50
suzie10011-Aug-05 13:50 
QuestionWhy doesn't CDC::StretchBlt() work properly, if both DCs are MemoryDCs ? Pin
Achim Klein11-Aug-05 2:27
Achim Klein11-Aug-05 2:27 
The function call in the bold line always returns 0.
Isn't StretchBlt() able to transfer data between two memory DCs ?

CDC* ZoomBitmap(CBitmap* pBitmap, CWnd* pWindow)
{
// get source size
CSize srcSize = doGetSize(pBitmap);

// get destination size (client rect)
CSize dstSize = doGetZoomedSize(pBitmap, pWindow);

// create memory device contexts
CDC* pDC = pWindow->GetDC();
CDC* mem1 = new CDC; mem1->CreateCompatibleDC(pDC);
CDC* mem2 = new CDC; mem2->CreateCompatibleDC(pDC);
pWindow->ReleaseDC(pDC);

// select bitmap in original size
CBitmap* old = mem1->SelectObject(pBitmap);

// stretch bitmap
mem2->SetStretchBltMode(HALFTONE);
mem2->StretchBlt(0, 0, dstSize.cx, dstSize.cy, mem1, 0, 0, srcSize.cx, srcSize.cy, SRCCOPY);

// reselect old bitmap
mem1->SelectObject(old);

// delete temporary device context
delete mem1;

// use for future BitBlt() operations
return mem2;
}
AnswerRe: Why doesn Pin
Chris Losinger11-Aug-05 3:15
professionalChris Losinger11-Aug-05 3:15 
GeneralRe: Why doesn Pin
Achim Klein11-Aug-05 3:30
Achim Klein11-Aug-05 3:30 
GeneralThread Problem Pin
Priyank Bolia11-Aug-05 2:11
Priyank Bolia11-Aug-05 2:11 
GeneralRe: Thread Problem Pin
SunKnight011-Aug-05 3:21
SunKnight011-Aug-05 3:21 
GeneralRe: Thread Problem Pin
HumanOsc11-Aug-05 5:39
HumanOsc11-Aug-05 5:39 
Questionstatic methods? Pin
Anonymous11-Aug-05 2:08
Anonymous11-Aug-05 2:08 
AnswerRe: static methods? Pin
Achim Klein11-Aug-05 2:14
Achim Klein11-Aug-05 2:14 
GeneralRe: static methods? Pin
Anonymous11-Aug-05 2:20
Anonymous11-Aug-05 2:20 
GeneralRe: static methods? Pin
Cedric Moonen11-Aug-05 2:32
Cedric Moonen11-Aug-05 2:32 
GeneralRe: static methods? Pin
Achim Klein11-Aug-05 2:33
Achim Klein11-Aug-05 2:33 
AnswerRe: static methods? Pin
toxcct11-Aug-05 3:30
toxcct11-Aug-05 3:30 
GeneralRe: static methods? Pin
Anonymous11-Aug-05 4:24
Anonymous11-Aug-05 4:24 
GeneralRe: static methods? Pin
sunit511-Aug-05 5:34
sunit511-Aug-05 5:34 
AnswerRe: static methods? Pin
sunit511-Aug-05 5:39
sunit511-Aug-05 5:39 
QuestionEnum "real" users Pin
peterchen11-Aug-05 1:37
peterchen11-Aug-05 1:37 
Question(Printer Driver)How to Hide Default Document Property sheet ? Pin
Anonymous11-Aug-05 0:51
Anonymous11-Aug-05 0:51 
QuestionHow can i get the length of a line in a multiline edit box? Pin
tl0825411-Aug-05 0:15
tl0825411-Aug-05 0:15 

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.