[VC++/WinAPI] HWND from HDC, how ?

This is a discussion on [VC++/WinAPI] HWND from HDC, how ? within the Windows Programming forums, part of the Platform Specific Boards category; Hello. I have a problem, I don't know how to take window's handle having device's context... If you don't understood ...

  1. #1
    Registered User jagi's Avatar
    Join Date
    Mar 2005
    Location
    Poland
    Posts
    21

    [VC++/WinAPI] HWND from HDC, how ?

    Hello. I have a problem, I don't know how to take window's handle having device's context... If you don't understood me, I'll try explaine it more precisely...

  2. #2
    Even death may die... Dante Shamest's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    970
    If you want to obtain the HWND from a HDC, use WindowFromDC

    If you want to obtain the HDC from a HWND use GetDC (anywhere) or BeginPaint (in WM_PAINT).

  3. #3
    Registered User jagi's Avatar
    Join Date
    Mar 2005
    Location
    Poland
    Posts
    21
    thanks

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, 02:17 AM
  2. Avoiding Global variables
    By csonx_p in forum Windows Programming
    Replies: 32
    Last Post: 05-19-2008, 01:17 AM
  3. My first "real" windows app
    By JoshR in forum Windows Programming
    Replies: 2
    Last Post: 07-28-2005, 08: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21