Click here to Skip to main content
15,908,173 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAccessing the date from webcamera with pure C++. Is it possible? Pin
mk_427-Feb-09 12:40
mk_427-Feb-09 12:40 
AnswerRe: Accessing the date from webcamera with pure C++. Is it possible? Pin
Garth J Lancaster27-Feb-09 15:45
professionalGarth J Lancaster27-Feb-09 15:45 
GeneralRe: Accessing the date from webcamera with pure C++. Is it possible? [modified] Pin
mk_428-Feb-09 0:08
mk_428-Feb-09 0:08 
GeneralRe: Accessing the date from webcamera with pure C++. Is it possible? Pin
ky_rerun28-Feb-09 18:26
ky_rerun28-Feb-09 18:26 
GeneralRe: Accessing the date from webcamera with pure C++. Is it possible? Pin
mk_41-Mar-09 1:26
mk_41-Mar-09 1:26 
GeneralRe: Accessing the date from webcamera with pure C++. Is it possible? Pin
ky_rerun1-Mar-09 5:51
ky_rerun1-Mar-09 5:51 
GeneralRe: Accessing the date from webcamera with pure C++. Is it possible? Pin
mk_41-Mar-09 8:03
mk_41-Mar-09 8:03 
QuestionMagnifying image & Resetting client scrollbars? Pin
Kiran Satish27-Feb-09 11:10
Kiran Satish27-Feb-09 11:10 
Hi,
I would like to know how this can be done in MFC. I have a Single Doc/View MFC application in which I display images and Zoom in/out of them etc and eveyrthing works fine except for the image position. I use scroll bars position to zoom in the image and redraw them. But, now I would like to do this so that whenever I zoom in an image, I would like to keep the image center fixed, in other words, I would like to perform zoom in/out functions with respect to the center of the image being displayed in the client area and reset the scroll bar position accordingly.

At present-
I update the scroll bar sizes as soon as I change the zoom factor.
m_cs.cx = ImgWidth()*zoom_const;<br />
m_cs.cy = ImgHeight()*zoom_const;<br />
SetScrollSizes(MM_TEXT, m_cs);<br />
InvalidateRect(NULL, true);


and then in Draw() function-
if (zoom_const > 1)<br />
{<br />
 dib->Draw(&dc, true, 0,0,myRect.Width(), myRect.Height(),<br />
       sp.x/zoom_const,sp.y/zoom_const,<br />
       myRect.Width()/zoom_const,myRect.Height()/zoom_const);<br />
}<br />
else<br />
 dib->Draw(&dc, false, 0,0,myRect.Width(), myRect.Height(),sp.x,sp.y,myRect.Width(), myRect.Height());


Could someone guide me on this??

thanks in advance.

PKNT

AnswerRe: Magnifying image & Resetting client scrollbars? Pin
Stuart Dootson27-Feb-09 20:44
professionalStuart Dootson27-Feb-09 20:44 
GeneralRe: Magnifying image & Resetting client scrollbars? Pin
Kiran Satish28-Feb-09 11:55
Kiran Satish28-Feb-09 11:55 
GeneralRe: Magnifying image & Resetting client scrollbars? Pin
Stuart Dootson28-Feb-09 12:02
professionalStuart Dootson28-Feb-09 12:02 
AnswerRe: Magnifying image & Resetting client scrollbars? Pin
Kiran Satish26-Mar-09 6:07
Kiran Satish26-Mar-09 6:07 
QuestionHow to catch a Msg in CView? Pin
Software200727-Feb-09 9:39
Software200727-Feb-09 9:39 
AnswerRe: How to catch a Msg in CView? Pin
Stuart Dootson27-Feb-09 9:55
professionalStuart Dootson27-Feb-09 9:55 
General[Message Deleted] Pin
Software200727-Feb-09 10:06
Software200727-Feb-09 10:06 
GeneralRe: How to catch a Msg in CView? Pin
Stuart Dootson27-Feb-09 10:16
professionalStuart Dootson27-Feb-09 10:16 
GeneralRe: How to catch a Msg in CView? [modified] Pin
Software200727-Feb-09 10:19
Software200727-Feb-09 10:19 
GeneralRe: How to catch a Msg in CView? Pin
Stuart Dootson27-Feb-09 10:48
professionalStuart Dootson27-Feb-09 10:48 
QuestionEvery Alternative Character is NULL while writing to a file Pin
Neelesh K J Jain27-Feb-09 5:13
Neelesh K J Jain27-Feb-09 5:13 
AnswerRe: Every Alternative Character is NULL while writing to a file Pin
Stuart Dootson27-Feb-09 5:42
professionalStuart Dootson27-Feb-09 5:42 
GeneralRe: Every Alternative Character is NULL while writing to a file Pin
Neelesh K J Jain27-Feb-09 6:06
Neelesh K J Jain27-Feb-09 6:06 
GeneralRe: Every Alternative Character is NULL while writing to a file Pin
Iain Clarke, Warrior Programmer27-Feb-09 7:45
Iain Clarke, Warrior Programmer27-Feb-09 7:45 
GeneralRe: Every Alternative Character is NULL while writing to a file Pin
Stuart Dootson27-Feb-09 8:16
professionalStuart Dootson27-Feb-09 8:16 
Questionnumbers per line Pin
jonig1927-Feb-09 4:40
jonig1927-Feb-09 4:40 
AnswerRe: numbers per line Pin
Stuart Dootson27-Feb-09 5:40
professionalStuart Dootson27-Feb-09 5:40 

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.