I might have some information that could help you. Here are a few articles I wrote here at codeproject:
Guide to WIN32 Paint for beginners[
^]
Guide to WIN32 Paint for Intermediates[
^]
Guide to Win32 Memory DC[
^]
With the shameless plug out of the way, here is a brief description.
The HDC is a handle to a Device Context similar to the HWND is a handle to a window. Let's draw a parallel between the two:
Window: An abstraction to represent something that can receive messages from the system, may have a size and location on the screen, may contain other windows, has behaviors and so on. You get access to all of this functionality through the APIs and the HWND for the window.
There are all types of windows: overlapped, dialogs, child windows, buttons, scrollbars, tool windows etc. You have a general set of functions that allow you to interact with these windows no matter what type of window they are. Then there are some special functions that only apply to windows of a particular type, such as a button with the click message.
Device Context: An abstraction to represent something that can create a visual representation. As Albert indicated GDI hides all of the details about accessing display hardware so the developer can write with one set of APIs to create visual output.
A device context can represent Window displays, bitmaps, printers, pen plot printers (which dont support raster bitmaps), or anything else that could relate to visual representations.
The links I listed above should help you get started. It definitely is a foreign concept until you get the hang of it. more detail than should go in a quick answer.
Ask more questions if this doesn't clear things up for you.