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
204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

627 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