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. how to hide "main dialog" properly?

how to hide "main dialog" properly?

Scheduled Pinned Locked Moved C / C++ / MFC
c++adobehelptutorialquestion
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.
  • I Offline
    I Offline
    includeh10
    wrote on last edited by
    #1

    The MFC app is "dialog based", "main window" is a CPropertySheet with 2 pages. logic process in CWinApp::InitInstance() looks like //------------------------------- Hide "main window" if(error) { show "main window"; display error on main dialog; } exit the app; //----------------------------- i have to hide main window first for some reasons - hard to explain why in a few sentences. according to process above, if no error, i should see nothing. but actually i always see the dialog in a flash. it means main window (property sheet) has not been hidden properly and thoroughly. do you know how to hide the dialog without seeing a flash? thx includeh10

    M 1 Reply Last reply
    0
    • I includeh10

      The MFC app is "dialog based", "main window" is a CPropertySheet with 2 pages. logic process in CWinApp::InitInstance() looks like //------------------------------- Hide "main window" if(error) { show "main window"; display error on main dialog; } exit the app; //----------------------------- i have to hide main window first for some reasons - hard to explain why in a few sentences. according to process above, if no error, i should see nothing. but actually i always see the dialog in a flash. it means main window (property sheet) has not been hidden properly and thoroughly. do you know how to hide the dialog without seeing a flash? thx includeh10

      M Offline
      M Offline
      mirex
      wrote on last edited by
      #2

      When you create dialog you specify its style, and one of the styles is if the window is shown or hidden. Remove shown flag. Use this if you create dialog through CDialog::Create() If you created dialog in Resource editor then doubleclickit to change its properties, and turn off Visible property.

      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