?
Solved

how to get HDC in CForview derived class onDraw()?

Posted on 2001-09-07
2
Medium Priority
?
280 Views
Last Modified: 2013-11-20
Hi,
  i'm using a forview derived SDI application.
 
   i wish to use a function which has this form

   myfunc(HDC hdc) inside the view class OnDraw() handler

   how to get a that hdc? is there a way to get it from CDC ? (which is available in the ondraw()

:)
0
Comment
Question by:orange_juice
[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
 
LVL 3

Accepted Solution

by:
cypherljk earned 200 total points
ID: 6465113
>>how to get a that hdc? is there a way to get it from CDC ?

Yes there is a member variable (m_hDC) which is exposed.

so use pDc->m_hDC to get the handle

Here is the online page: http://www.msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_cdc.3a3a.m_hdc.asp

My 2 cents...
0
 
LVL 1

Author Comment

by:orange_juice
ID: 6466534
thank you :)
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

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…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

777 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