Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Smart Camera scanning and reading information 3 100
isEverywhere  challenge 19 72
how to use laptop or pad camera in vb.net windows application 2 55
x-bar in Google Sheets 2 26
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

896 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

14 Experts available now in Live!

Get 1:1 Help Now