Click here to Skip to main content
16,005,339 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Kiran Satish1-Nov-07 12:57
Kiran Satish1-Nov-07 12:57 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Kiran Satish1-Nov-07 13:45
Kiran Satish1-Nov-07 13:45 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Chris Losinger1-Nov-07 14:04
professionalChris Losinger1-Nov-07 14:04 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Kiran Satish2-Nov-07 8:03
Kiran Satish2-Nov-07 8:03 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Chris Losinger2-Nov-07 8:15
professionalChris Losinger2-Nov-07 8:15 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Kiran Satish6-Nov-07 13:13
Kiran Satish6-Nov-07 13:13 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Chris Losinger6-Nov-07 14:49
professionalChris Losinger6-Nov-07 14:49 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Kiran Satish7-Nov-07 6:50
Kiran Satish7-Nov-07 6:50 
I tried exactly what you said (I hope), declared a CBitmap member in Document class and using it instead of tempBMP like below..

CClientDC dc(this);<br />
if (zoom_const >1)<br />
{<br />
CDC tempDC;<br />
tempDC.CreateCompatibleDC(NULL);<br />
if (m_bZoomUpdate)//update bitmap for the first time when zoom_const changes<br />
{<br />
GetDocument()->m_zoomedBMP.CreateCompatibleBitmap(&dc, w*zoom_const,h*zoom_const);<br />
tempDC.SelectObject(&GetDocument()->m_zoomedBMP);<br />
dib->Draw(&tempDC, 0,0,w*GetDocument()->zoom_const,h*GetDocument()->zoom_const,0,0,w,h);		<br />
m_bZoomUpdate = false;<br />
}<br />
else<br />
tempDC.SelectObject(&GetDocument()->m_zoomedBMP);<br />
dc.BitBlt( 0, 0, w*zoom_const,h*zoom_const, &tempDC, sp.x, sp.y, SRCCOPY);<br />
}<br />
else //zoom_const =1<br />
dib->Draw(&dc, 0,0,w*zoom_const,h*zoom_const,sp.x,sp.y,w,h);


It works... and the drawing is as normal with no delays... Now time for getting the exact location of a pixel in zoom mode D'Oh! | :doh: .

thanks,
-PNT.



PKNT

GeneralRe: Need an alternative for StretchBlt()?? Pin
Kiran Satish8-Nov-07 7:17
Kiran Satish8-Nov-07 7:17 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Chris Losinger10-Nov-07 7:13
professionalChris Losinger10-Nov-07 7:13 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Kiran Satish14-Nov-08 13:21
Kiran Satish14-Nov-08 13:21 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Chris Losinger14-Nov-08 17:59
professionalChris Losinger14-Nov-08 17:59 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Kiran Satish17-Nov-08 6:50
Kiran Satish17-Nov-08 6:50 
GeneralRe: Need an alternative for StretchBlt()?? Pin
Chris Losinger17-Nov-08 7:08
professionalChris Losinger17-Nov-08 7:08 
Questiontwo dialogs placing problem? Pin
Gofur Halmurat30-Oct-07 6:57
Gofur Halmurat30-Oct-07 6:57 
AnswerRe: two dialogs placing problem? Pin
led mike30-Oct-07 7:06
led mike30-Oct-07 7:06 
QuestionRe: two dialogs placing problem? Pin
CPallini30-Oct-07 7:14
mveCPallini30-Oct-07 7:14 
AnswerRe: two dialogs placing problem? Pin
Maximilien30-Oct-07 7:14
Maximilien30-Oct-07 7:14 
GeneralRe: two dialogs placing problem? Pin
Gofur Halmurat30-Oct-07 7:16
Gofur Halmurat30-Oct-07 7:16 
GeneralRe: two dialogs placing problem? Pin
Maximilien30-Oct-07 7:22
Maximilien30-Oct-07 7:22 
GeneralRe: two dialogs placing problem? Pin
Gofur Halmurat30-Oct-07 7:21
Gofur Halmurat30-Oct-07 7:21 
GeneralRe: two dialogs placing problem? Pin
CPallini30-Oct-07 7:26
mveCPallini30-Oct-07 7:26 
AnswerRe: two dialogs placing problem? Pin
Mark Salsbery30-Oct-07 7:24
Mark Salsbery30-Oct-07 7:24 
GeneralRe: two dialogs placing problem? Pin
led mike30-Oct-07 10:12
led mike30-Oct-07 10:12 
GeneralRe: two dialogs placing problem? Pin
Mark Salsbery30-Oct-07 10:17
Mark Salsbery30-Oct-07 10:17 

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.