Solved

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

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

831 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