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. window stops repainting...

window stops repainting...

Scheduled Pinned Locked Moved C / C++ / MFC
jsonhelpquestion
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
    Ramsus
    wrote on last edited by
    #1

    Hi everyone, I have a main window with a gradient background onto which client area I output text using DrawTextEx. The background of the rectangle of the drawtext function is set to transparent. I invalidate this rectangle everytime I change the text so that the new text will be visible on the gradient background. This works fine for a while and then suddenly windows seems to stop painting the window all together ....? The text still continiues to be outputed , but on a white rectangle background now. The window does not seem to repaint either. I am using straight WIN32 api and simple message handling. Anybody have any ideas ? This is driving up the walls... help will be much appreciated. Carpe Deum

    R 1 Reply Last reply
    0
    • R Ramsus

      Hi everyone, I have a main window with a gradient background onto which client area I output text using DrawTextEx. The background of the rectangle of the drawtext function is set to transparent. I invalidate this rectangle everytime I change the text so that the new text will be visible on the gradient background. This works fine for a while and then suddenly windows seems to stop painting the window all together ....? The text still continiues to be outputed , but on a white rectangle background now. The window does not seem to repaint either. I am using straight WIN32 api and simple message handling. Anybody have any ideas ? This is driving up the walls... help will be much appreciated. Carpe Deum

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      Perhaps you're not freeing resources (pens, brushes) you use in your painting code? That could lead to resource exhaustion. Try adding VERIFYs to your code to verify correct operation and see if they fail. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

      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