Solved

Through which functions can HDC type variables be created?

Posted on 2009-05-08
4
507 Views
Last Modified: 2013-12-03
Hello. I'd like to know which functions can create an HDC type variable. I am hooking a program that is using HDCs and I'd like to know which functions might be creating it and also which ones can be using it. I know this program will use things drawed in small pictures to put everything in a big picture(I guess it's double buffering), before it shows me the final pic. Thanks
0
Comment
Question by:devoured_elysium
4 Comments
 
LVL 31

Expert Comment

by:Zoppo
ID: 24334657
Hi devoured_elysium,

well, HDCs are create with ::CreateDC. A list of all functions which can use a HDC is quite long since nearly and GDI function uses a HDC. You can take a look at the GDI description in MSDN here http://msdn.microsoft.com/en-us/library/dd145203(VS.85).aspx, there you'll find (I guess) all functions which use HDC.

ZOPPO
0
 
LVL 19

Accepted Solution

by:
alb66 earned 125 total points
ID: 24334687
In order to get the device context for a specific windoe you can use GetDC()
http://msdn.microsoft.com/en-us/library/aa921543.aspx

HDC hDC = GetDC( hWnd );
0
 

Author Comment

by:devoured_elysium
ID: 24334904
Yes, it seems to be using GetDC(). I thought I'd already tried that one but now I see that's being used. Thanks

One more question, though. If this application is indeed using double buffering, is it probably using bitmaps or is there any other common way of doing it? I mean this as I've hooked CreateBitmap and it shows nothing.
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
best sources to up-to-date in C++? 8 70
ClickOnce Install - Shortcut Question 3 72
changeXy challenge 13 67
Issues with C++ Class 19 81
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
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.

920 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

16 Experts available now in Live!

Get 1:1 Help Now