drawing to my window

This is a discussion on drawing to my window within the Windows Programming forums, part of the Platform Specific Boards category; i need to do some drawing functions outside of the WM_PAINT, in another thread acctualy, i tried passing the hwnd ...

  1. #1
    Mmm. Purple.
    Join Date
    May 2002
    Posts
    154

    drawing to my window

    i need to do some drawing functions outside of the WM_PAINT, in another thread acctualy, i tried passing the hwnd as a param to the thread then using GetDC but it seems to get the dc of the desktop because everything is being draw to the top left of the screen, even if my window is minimized or something

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    GetDC returns the screen DC if passed NULL as its argument. Therefore, review your code to make sure you are passing the hwnd to GetDC and not NULL.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C or C++
    By AcerN30 in forum Game Programming
    Replies: 41
    Last Post: 05-30-2008, 07:57 PM
  2. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 09:23 AM
  3. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  4. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 02:39 PM
  5. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 01:34 PM

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