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 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 
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 
I am back with a problem closely related to this topic... everything is fine and was able to magnify the images upto the point when I load images of 40MB in size. Then this function behaves differently on different machines (same OS) except on one machine with 64bit OS (where it can magnify to any scale without problem). On some machines it doesn't even magnify one step and on some machines it magnifies to few steps (after that it just shows either white or black frame when you try to magnify). Here is the code that I am currently using-


if (GetDocument()->zoom_const >100)// if magnification is more than 100%
{
  CDC tempDC;
  tempDC.CreateCompatibleDC(NULL);			
  if (GetDocument()->m_bZoomUpdate)//magnify the image
  {	
    GetDocument()->m_zoomedBMP.DeleteObject(); //m_zoomedBMP is an object of CBitmap
    GetDocument()->m_zoomedBMP.CreateCompatibleBitmap(&dc, w*GetDocument()->zoom_const/100,h*GetDocument()->zoom_const/100);
    tempDC.SelectObject(&GetDocument()->m_zoomedBMP);
    dib->Draw(&tempDC, 0,0,w*GetDocument()->zoom_const/100,h*GetDocument()->zoom_const/100,0,0,w,h);
    GetDocument()->m_bZoomUpdate = false; //reset the magnification flag
  }
  else //otherwise just redraw the already magnified image
    tempDC.SelectObject(&GetDocument()->m_zoomedBMP);
  dc.BitBlt( 0, 0, w*GetDocument()->zoom_const/100,h*GetDocument()->zoom_const/100, &tempDC, sp.x, sp.y, SRCCOPY);
}
else // draw the image at 100%
  dib->Draw(&dc, 0,0,w*GetDocument()->zoom_const/100,h*GetDocument()->zoom_const/100,sp.x,sp.y,w,h);


Is there any other way to do this more efficiently and overcome this problem.

thanks,

PKNT

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 
GeneralRe: two dialogs placing problem? Pin
led mike30-Oct-07 11:10
led mike30-Oct-07 11:10 
QuestionNumber of Columns used in excel Pin
prithaa30-Oct-07 6:28
prithaa30-Oct-07 6:28 
QuestionI Need some help creating HBITMAP Pin
Miguel Resto30-Oct-07 5:12
Miguel Resto30-Oct-07 5:12 

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.