Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. menu dropshadow flickers when ontop of MDI child window

menu dropshadow flickers when ontop of MDI child window

Scheduled Pinned Locked Moved C / C++ / MFC
csharphelpvisual-studiographicsgame-dev
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hin Jang
    wrote on last edited by
    #1

    background info: i currently have an MDI app (created with Visual Studio .NET 2003) that can properly create new child windows. each of these windows contains a rendered scene via OpenGL. all of my OpenGL calls are invoked from within an overloaded OnPaint() method. i enabled double-buffering so animations are smooth. i also overloaded the OnEraseBkgnd() method so the background will not be repainted when the child window is resized. the problem: when i make a selection from the main menu bar i noticed the menu dropshadow flickers when it occludes/overlays a portion of the child window. my first assumption was that my scenes were too complex; the flickering exposes the slow "repaints" of the scene. as such, i made the necessary changes so that each child window only displays a blank grey background. the problem, however, persists for even this most simple of scenes. i next looked up the online documentation regarding the CWnd::OnPaint() method. the docs state the framework calls OnPaint() only once by default. to verify this i set a breakpoint in my OnPaint() method only to discover it gets called dozens of times! i suspect the flickering is due to the framework calling the OnPaint() over and over and over again. an artifact from the time-consuming "repaints" is this flickering of the menu dropshadows. does anyone have any suggestions on how to ensure that OnPaint() is only called when necessary? any help would be greatly appreicated. thanks.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups