Solved

Accessing a device context that allows you  to draw on the entire document area, and not just the viewable portion of it.

Posted on 1998-06-05
2
194 Views
Last Modified: 2013-11-19
How can I access the  device context that allows you  to draw on the entire document area, and not just the viewableportion of it. CScrollView::OnDraw provides you with a pDC that represents the entire document area, and not just the viewable portion of it. That is what I need, but I need this from within a CScrollView command handler function. Can I access a device context such as this from within a  command handler function? Basically, right now I am coding my command handler, and the next step is for me to output an array of points to the device context that represents the  entire document area, and not just the viewable portion of it.
0
Comment
Question by:cMan
2 Comments
 

Accepted Solution

by:
wyhjin earned 70 total points
ID: 1316077
You can get access to the overall device context, no matter viewable section or not.
My suggestion is that you handle your command by processing data in your document or CScrollView derived objects, and output your array points by calling OnUpdate() member function, and draw them in OnDraw() overrode function.
Make sure SetScrollSizes() function is called for specifying your document size needed for your application.

0
 

Author Comment

by:cMan
ID: 1316078
Thanks wyhjin, that worked perfectly.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Add content to output file 4 62
FizzBuzz challenge 9 76
firstChar challenge 13 107
Thin secure Windows 10 5 74
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now