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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adapt this command to show who installed 29 111
Pressing cancel button with C# UI Automation 3 81
java ^ examples 8 69
Excel file not created as expected 7 79
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…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 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