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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 54
Unix / Linux grid computing 5 171
how do i create updater to My Activex application? 3 108
sumHeights2  challenge 7 139
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.

738 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