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. What SW_HIDE is ShowWindow does?

What SW_HIDE is ShowWindow does?

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.
  • D Offline
    D Offline
    Dimitris Vikeloudas
    wrote on last edited by
    #1

    I want to create and drawn to CScrollView that is invisible from the user. Sould I show it using a ShowWindow(SW_HIDE)? Will this permit me to draw on it?

    M 1 Reply Last reply
    0
    • D Dimitris Vikeloudas

      I want to create and drawn to CScrollView that is invisible from the user. Sould I show it using a ShowWindow(SW_HIDE)? Will this permit me to draw on it?

      M Offline
      M Offline
      Martin Koorts
      wrote on last edited by
      #2

      Hi Yes, the standard CWnd-derived behaviour (such as ShowWindow) will work - you'll have to ensure the focus isn't set to the invisible view if you want the keyboard active, and make sure the window isn't displayed by accident elsewhere, such as a custom OnSize handler, etc. And yes, I believe you can still process OnPaint, OnDraw messages even if the window is not visible - as you can with most messages. I would just not expect the OS to initiate these (WM_PAINT messages) as the window would not require painting in this state. That said, calling UpdateWindow forces a visit of the paint routine (SendMessage(WM_PAINT, ...) I believe). Anyway, let me leave you to your devices.... ;-) HTH Martin

      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