Stopping windows from drawing a window...

This is a discussion on Stopping windows from drawing a window... within the Windows Programming forums, part of the Platform Specific Boards category; I cannot figure out how to stop windows from drawing a window, I think its a "USERDRAW" flag but I ...

  1. #1
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Exclamation Stopping windows from drawing a window...

    I cannot figure out how to stop windows from drawing a window, I think its a "USERDRAW" flag but I am not sure, I dont wan the window not to be there, I just want to draw it myself, any ideas?

    SPH

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Make sure your wnd has a NULL brush when you create it. Give it the WS_POPUP style (|WS_SYSMENU if you want to get it to minimize to the taskbar).

    Then just draw it (blt) yourself either diy, in WM_PAINT or WM_ERASEBKGND.

    If you give your wnd the WS_SYSMENU style you might want to handle the WM_NCHITTEST to emulate/simulate default sys menu cmds.

  3. #3
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Lightbulb well....

    Thats what I did, and it works okay, but I wanted to know if there was a was to keep the window the way it is, but make windows just not draw it?

    SPH

    P.S. I used the "do it you'reself way", didn't use windowz messaging stuff... I wrote math to simulated buttons and sliderz and the system menu itself.

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>didn't use windowz messaging stuf<<

    which is possibly the beginning & end of your problem.

    At the very least, handle the WM_ERASEBKGND; all you need do in it is:

    return TRUE;

    This should stop windows from drawing the background.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Don't call ShowWindow()?
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Script errors - bool unrecognized and struct issues
    By ulillillia in forum Windows Programming
    Replies: 10
    Last Post: 12-18-2006, 04:44 AM
  2. My Window Class
    By Epo in forum Game Programming
    Replies: 2
    Last Post: 07-10-2005, 03:33 PM
  3. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 11:14 PM
  4. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM
  5. g_hWndMain = hWnd;error C2065,C2440
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 12-09-2001, 03:36 PM

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