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
192 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 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

13 Experts available now in Live!

Get 1:1 Help Now