Click here to Skip to main content
15,893,904 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Where to place "OLEMISC_ACTIVATEWHENVISIBLE" at ATL ActiveX control? Pin
Mike Dimmick11-Aug-03 11:08
Mike Dimmick11-Aug-03 11:08 
GeneralRe: Where to place "OLEMISC_ACTIVATEWHENVISIBLE" at ATL ActiveX control? Pin
vgrigor11-Aug-03 20:39
vgrigor11-Aug-03 20:39 
GeneralCreating a loop in a dialog Pin
Kayembi11-Aug-03 3:45
Kayembi11-Aug-03 3:45 
GeneralRe: Creating a loop in a dialog Pin
Ravi Bhavnani11-Aug-03 3:53
professionalRavi Bhavnani11-Aug-03 3:53 
GeneralRe: Creating a loop in a dialog Pin
Kayembi11-Aug-03 12:10
Kayembi11-Aug-03 12:10 
GeneralRe: Creating a loop in a dialog Pin
Ravi Bhavnani12-Aug-03 2:30
professionalRavi Bhavnani12-Aug-03 2:30 
QuestionHow to add a property that binds a list ActiveX to a DataSource Pin
Daed11-Aug-03 3:23
Daed11-Aug-03 3:23 
GeneralScrolling an image. Pin
Neha11-Aug-03 2:48
Neha11-Aug-03 2:48 
Hi,

I have a picture control where i display the image with scroll bars. I do draw a selection rectangle over the bitmap. It is working fine. But when i scroll through the image selection rectange doesn't match with the selected image. ie selection rectange moves fast towards left than the image.
Here is my logic
ConvertClientToImageREct()
{

m_bmprect.left =(the_xoffset+(floor)(in_ClientRect.left/m_XZoom)) ;
m_bmprect.top =(the_yoffset+(floor)(in_ClientRect.top/m_YZoom));
m_bmprect.right =(m_bmprect.left+(floor)(in_ClientRect.Width ()/m_XZoom));
m_bmprect.bottom =(m_bmprect.top+(floor)(in_ClientRect.Height ()/m_YZoom));
}
ConvertImageRectToClientRect()
{

the_MyRect.left=the_xoffset< m_bmprect.left?(m_bmprect.left-sourcex)*m_XZoom: -1;
the_MyRect.right=the_xoffset< m_bmprect.right ? (m_bmprect.right-sourcex)
m_XZoom:-1;
the_MyRect.top =the_yoffset< m_bmprect.top ? (m_bmprect.top-sourcey)*m_YZoom:-1
the_MyRect.bottom =the_yoffset< m_bmprect.bottom ? (m_bmprect.bottom-sourcey)*m_YZoom:-1;
}
I am diaplying the image using StrechBitblt() as follows
dc.StretchBlt(the_rect.left,the_rect.top,he_rect.Width (),the_rect.Height (),&bmDC,sourcex, sourcey,m_bmp.bmWidth/m_XOrgZoom,m_bmp.bmHeight/m_YOrgZoom,SRCCOPY);


Can anyone tell me where i am doing wrong?

Regards
Neha
GeneralWeird thing with GetKeyState() Pin
keegan11-Aug-03 2:45
keegan11-Aug-03 2:45 
GeneralRe: Weird thing with GetKeyState() Pin
Mike Dimmick11-Aug-03 3:02
Mike Dimmick11-Aug-03 3:02 
GeneralRe: Weird thing with GetKeyState() Pin
HPSI11-Aug-03 3:18
HPSI11-Aug-03 3:18 
QuestionHow to get application icon associated with a file Pin
gumber11-Aug-03 2:23
gumber11-Aug-03 2:23 
AnswerRe: How to get application icon associated with a file Pin
David Crow11-Aug-03 2:38
David Crow11-Aug-03 2:38 
AnswerRe: How to get application icon associated with a file Pin
Jason Henderson11-Aug-03 3:28
Jason Henderson11-Aug-03 3:28 
GeneralGlobal variable Pin
Jerome Conus11-Aug-03 2:07
Jerome Conus11-Aug-03 2:07 
GeneralRe: Global variable Pin
Mike Dimmick11-Aug-03 2:09
Mike Dimmick11-Aug-03 2:09 
GeneralRe: Global variable Pin
Anthony_Yio11-Aug-03 16:09
Anthony_Yio11-Aug-03 16:09 
GeneralDestroy() window in MFC Pin
cberam11-Aug-03 1:53
cberam11-Aug-03 1:53 
GeneralRe: Destroy() window in MFC Pin
jhwurmbach11-Aug-03 2:09
jhwurmbach11-Aug-03 2:09 
GeneralRe: Destroy() window in MFC Pin
HPSI11-Aug-03 2:43
HPSI11-Aug-03 2:43 
GeneralGetPixel function Pin
El'Cachubrey11-Aug-03 0:27
El'Cachubrey11-Aug-03 0:27 
GeneralRe: GetPixel function Pin
HPSI11-Aug-03 2:18
HPSI11-Aug-03 2:18 
QuestionCapture screen, do u have another idea and make it faster? Pin
includeh1011-Aug-03 0:16
includeh1011-Aug-03 0:16 
AnswerRe: Capture screen, do u have another idea and make it faster? Pin
David Crow11-Aug-03 2:36
David Crow11-Aug-03 2:36 
GeneralRe: Capture screen, do u have another idea and make it faster? Pin
includeh1011-Aug-03 2:42
includeh1011-Aug-03 2:42 

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.