Thread: HDC and HWND

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    25

    HDC and HWND

    Can someone please explain to me what these things are (HDC and HWND)? I am having some problem with my program that is related to these...and I just want to know what they are and how they behave...any help or hints on how to use them correctly will be greatly appreciated! Thanks.

    *bold part being more important

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    The 'H' preceeding both meand Handle......

    HWND - Handle to window...this is your identifier for each window (and therefore control) created......

    HDC - Handle to device contect....a device context is an internal structure that hold information on how simple graphics are displayed on an output (pens, brushes, fonts....)...this output can be a screen, printer, plotter etc

    How to use them fills chapters in books........so I cant give you a comprehensive example.......

    If you dont want a book, try some tutorials (do a board and try www.sunlightd.com and http://www.foosyerdoos.fsnet.co.uk for starters)...then look at MSDN

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. My progress.. thnx to Cprogramming forumites
    By csonx_p in forum Windows Programming
    Replies: 6
    Last Post: 05-21-2008, 01:17 AM
  2. Avoiding Global variables
    By csonx_p in forum Windows Programming
    Replies: 32
    Last Post: 05-19-2008, 12:17 AM
  3. My first "real" windows app
    By JoshR in forum Windows Programming
    Replies: 2
    Last Post: 07-28-2005, 07:40 AM
  4. destroywindow() problem
    By algi in forum Windows Programming
    Replies: 6
    Last Post: 03-27-2005, 11:40 PM
  5. opengl program as win API menu item
    By SAMSAM in forum Game Programming
    Replies: 1
    Last Post: 03-03-2003, 07:48 PM