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. Invalidate method

Invalidate method

Scheduled Pinned Locked Moved C / C++ / MFC
graphicshelpquestiongame-dev
2 Posts 2 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.
  • R Offline
    R Offline
    Rajveer
    wrote on last edited by
    #1

    I'm drawing graphics with OpenGL in an MDI application. In my OnDraw() function, I have the following portion of code: if(spin==1) { Y_Angle++; Invalidate(TRUE); } I have a button which makes spin=1. So when I press this, Y_Angle will continue to increment and then Invalidate(TRUE) redraws the scene each time, giving the appearance of continuous rotation. This works fine. Problem is, when I click any menu thats supposed to bring up a dialog box, the box doesn't come up. I have a feeling this has something to do with Invalidate(TRUE) continuously redrawing the scene. How can I fix this?

    J 1 Reply Last reply
    0
    • R Rajveer

      I'm drawing graphics with OpenGL in an MDI application. In my OnDraw() function, I have the following portion of code: if(spin==1) { Y_Angle++; Invalidate(TRUE); } I have a button which makes spin=1. So when I press this, Y_Angle will continue to increment and then Invalidate(TRUE) redraws the scene each time, giving the appearance of continuous rotation. This works fine. Problem is, when I click any menu thats supposed to bring up a dialog box, the box doesn't come up. I have a feeling this has something to do with Invalidate(TRUE) continuously redrawing the scene. How can I fix this?

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      First of all, I'll make sure it is the continuous calling to Invalidate that is causing the problem. To determine this, simply comment the call out and check if the dialog box appears now. Assumming that is indeed the problem, try setting a timer and calling Invalidate there. Check Nemanja Trifunovic's Timers tutorial for further info on timers. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      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