Click here to Skip to main content
15,912,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionGDI+ DrawImage() Speed Issue Pin
Redeye9219-Feb-09 22:23
Redeye9219-Feb-09 22:23 
AnswerRe: GDI+ DrawImage() Speed Issue Pin
frx9619-Feb-09 23:03
frx9619-Feb-09 23:03 
GeneralRe: GDI+ DrawImage() Speed Issue Pin
Redeye9219-Feb-09 23:11
Redeye9219-Feb-09 23:11 
AnswerRe: GDI+ DrawImage() Speed Issue Pin
KarstenK19-Feb-09 23:21
mveKarstenK19-Feb-09 23:21 
GeneralRe: GDI+ DrawImage() Speed Issue Pin
Redeye9219-Feb-09 23:29
Redeye9219-Feb-09 23:29 
GeneralRe: GDI+ DrawImage() Speed Issue Pin
KarstenK20-Feb-09 0:06
mveKarstenK20-Feb-09 0:06 
AnswerRe: GDI+ DrawImage() Speed Issue Pin
Nishad S19-Feb-09 23:55
Nishad S19-Feb-09 23:55 
GeneralRe: GDI+ DrawImage() Speed Issue Pin
Redeye9220-Feb-09 0:15
Redeye9220-Feb-09 0:15 
You know I was hoping that was going to be possible, but it seems that you can't write to the Graphics object whilst you've got its HDC. The code I've been using to substitute DrawImage() in OnPaint() is :

m_pbmpMemory->GetHBITMAP(Color::White, &m_hMemBitmap);
m_hMemHDC = m_gr->GetHDC();
SelectObject(m_hMemHDC, m_hMemBitmap);
BitBlt(pDC->m_hDC, rcPaint.left, rcPaint.top, rcPaint.Width(), rcPaint.Height(),
    m_hMemHDC, rcPaint.left, rcPaint.top, SRCCOPY);
m_gr->ReleaseHDC(m_hMemHDC);


Am I missing something here which would save me having to do all the stuff around the BitBlt? I just can't see how to keep a hold of the HDC and HBITMAP between calls to OnPaint(), but I'd be a happy man if someone knows how to get around this.
GeneralRe: GDI+ DrawImage() Speed Issue Pin
Nishad S20-Feb-09 0:29
Nishad S20-Feb-09 0:29 
GeneralRe: GDI+ DrawImage() Speed Issue Pin
Redeye9220-Feb-09 0:54
Redeye9220-Feb-09 0:54 
AnswerRe: GDI+ DrawImage() Speed Issue Pin
Stuart Dootson20-Feb-09 2:40
professionalStuart Dootson20-Feb-09 2:40 
GeneralThe Solution Pin
Redeye9220-Feb-09 3:29
Redeye9220-Feb-09 3:29 
GeneralRe: The Solution Pin
micahferguson28-Feb-09 9:53
micahferguson28-Feb-09 9:53 
GeneralRe: The Solution Pin
Redeye921-Mar-09 21:46
Redeye921-Mar-09 21:46 
QuestionAttempting to get 'Desktop PIDL' on Win2k, Win98 - Bizarre behavior Pin
ab4rum19-Feb-09 21:03
ab4rum19-Feb-09 21:03 
AnswerRe: Attempting to get 'Desktop PIDL' on Win2k, Win98 - Bizarre behavior Pin
Stuart Dootson20-Feb-09 2:59
professionalStuart Dootson20-Feb-09 2:59 
Questionhow to set sound output in left or right side of headphone? Pin
nekokan19-Feb-09 20:06
nekokan19-Feb-09 20:06 
AnswerRe: how to set sound output in left or right side of headphone? Pin
Nishad S20-Feb-09 0:00
Nishad S20-Feb-09 0:00 
QuestionRenaming solution file in vc++ Pin
priyankapriyanka19-Feb-09 19:04
priyankapriyanka19-Feb-09 19:04 
AnswerREPOST: ANSWERED Yesterday! Pin
_AnsHUMAN_ 19-Feb-09 19:13
_AnsHUMAN_ 19-Feb-09 19:13 
AnswerRe: Renaming solution file in vc++ Pin
Chandrasekharan P19-Feb-09 19:32
Chandrasekharan P19-Feb-09 19:32 
GeneralRe: Renaming solution file in vc++ Pin
priyankapriyanka19-Feb-09 22:30
priyankapriyanka19-Feb-09 22:30 
GeneralRe: Renaming solution file in vc++ Pin
Chandrasekharan P19-Feb-09 23:43
Chandrasekharan P19-Feb-09 23:43 
AnswerIt's also time to rename your post. Pin
CPallini19-Feb-09 21:53
mveCPallini19-Feb-09 21:53 
Questionlogging optimization. Pin
vikramlinux19-Feb-09 19:00
vikramlinux19-Feb-09 19:00 

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.