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. Returning focus to window

Returning focus to window

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I'm using dialog window for data display. The data displayed on Gauge control with colored background, using StaticText control. At the first appearance of the dialog the data is displayed. After moving focus to another window and returning to my dialog the data in StaticText control is not displayed, only the colored Gauge appears. But after few minutes the data becomes visible. How can I cause controls to be refreshed in the correct way?

    X 1 Reply Last reply
    0
    • L Lost User

      I'm using dialog window for data display. The data displayed on Gauge control with colored background, using StaticText control. At the first appearance of the dialog the data is displayed. After moving focus to another window and returning to my dialog the data in StaticText control is not displayed, only the colored Gauge appears. But after few minutes the data becomes visible. How can I cause controls to be refreshed in the correct way?

      X Offline
      X Offline
      X2040
      wrote on last edited by
      #2

      am not sure that i understood your problem correctly but i want you to try this solution put the line of code that draw on the dialog or insert data in the Controls inside the function called "OnPaint" --> "WM_PAINT" you will find this function and if not found bring it from the Class wizard of the Dialog. the OnPaint is called every time an Update Occured in your window. so when you will set the focus to your dialog again the OnPaint will be called which will draw and set inputs again.

      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