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. win32 dialogs...

win32 dialogs...

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

    I create Dialog Box with case WM_CTLCOLORSTATIC: { HDC hdcStatic = (HDC)wParam; SetTextColor(hdcStatic, RGB(255, 255, 255)); SetBkMode(hdcStatic, TRANSPARENT); return (long)(g_hbrBackground); } but after chusing another program and return to dialog activation - it don't show dialog box at all!!! (when I do UpdateWindow in case ON_PAINT, it show dialog, but without color!!)

    M 1 Reply Last reply
    0
    • U User 3822629

      I create Dialog Box with case WM_CTLCOLORSTATIC: { HDC hdcStatic = (HDC)wParam; SetTextColor(hdcStatic, RGB(255, 255, 255)); SetBkMode(hdcStatic, TRANSPARENT); return (long)(g_hbrBackground); } but after chusing another program and return to dialog activation - it don't show dialog box at all!!! (when I do UpdateWindow in case ON_PAINT, it show dialog, but without color!!)

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      The code you posted wouldn't have anything to do with that problem (I'm assuming that code is in the dialog proc). Using UpdateWindow in response to WM_PAINT is BAD.  It's redundant, and also probably won't do anything. UpdateWindow causes a WM_PAINT message to be sent by the system if any area of the window being updated is marked invalid. You're doing something wrong somewhere in your dialog proc if the window is not redrawing properly. Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      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