Solved

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

Posted on 2001-09-07
2
262 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 50 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

Technology Partners: 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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 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