Solved

Through which functions can HDC type variables be created?

Posted on 2009-05-08
4
515 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

815 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

7 Experts available now in Live!

Get 1:1 Help Now