Solved

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Unix / Linux grid computing 5 127
How to determine file rename from EventLog ? 2 36
if loop in java 3 114
matchUp  challenge 9 71
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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 video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

21 Experts available now in Live!

Get 1:1 Help Now