Solved

Through which functions can HDC type variables be created?

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

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

747 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

10 Experts available now in Live!

Get 1:1 Help Now