Thread: Argh! Flickering!!!

  1. #1
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273

    Angry Argh! Flickering!!!

    Hi,
    I've been having trouble recently with a window of mine. It's got a toolbar, status window and an MDI client window on it. The problem is, the flickering on it is driving me mad!!!
    Oh, is there no relief from this pain of semi-visible windows?!?

    No MFC please, I'm British...

  2. #2
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,227
    >>No MFC please, I'm British...

    LOL! Hadn't realized the brits had MFC allergies.

  3. #3
    Ken Fitike
    Guest
    Don't know if this will help but try returning TRUE from WM_ERASEBKGND handler to prevent windows from drawing the background.

  4. #4
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    Yeah, I had tried that, but it made no difference.
    Looking at WinZip, that does flicker slightly when resized, but with my window it's ridiculous (the toolbar button images phase in and out of reality, the status window disappears and then reappears...)

  5. #5
    Registered User xds4lx's Avatar
    Join Date
    Nov 2001
    Posts
    630
    What styles are you using to create the toolbar? the MDI client? and the main window? I had this problem a while ago and got rid of it by changing some of the styles around. I cant remembe the exact solution b/c its been 2 1/2 years since then and I lost the project when my old hard drive permenently crashed. Ill look and post it if I can find it again, but my suggestion is for you to add some moer WS_xxx and WS_EX_xxx to your main window.
    "only two things are infinite, the universe and human stupidity, and im not sure about the former." - albert einstein

  6. #6
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    My toolbar has the styles WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS, the MDI client has the styles WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN and the main window has the styles WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN.
    Any ideas?

  7. #7
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    I just looked at MSVC when it is resized (Bit silly for me not to do that in the first place but that just shows the zig-zag way I take in solving problems ), and while the menu toolbar at the top does flicker a little bit, the other toolbars in particular are flicker-free. Is there a special way toolbars should be handled in WM_SIZE messages (apart from sending the TB_AUTOSIZE message)?

    I also read somewhere that dynamically-generated toolbars (like mine) are more prone to flickering than those from resources. Is this true?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. flickering
    By ElastoManiac in forum Windows Programming
    Replies: 10
    Last Post: 12-23-2005, 08:26 AM
  2. graphics flickering problem
    By Benzakhar in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 02-23-2004, 05:15 PM
  3. TextOut() flickering
    By Xterria in forum Game Programming
    Replies: 6
    Last Post: 01-22-2004, 09:55 PM
  4. Flickering
    By Visu A in forum C Programming
    Replies: 1
    Last Post: 02-27-2002, 12:48 AM
  5. argh! (argc and argv too!)
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 11-11-2001, 04:01 PM