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. Hiding MFC Dialog based applications

Hiding MFC Dialog based applications

Scheduled Pinned Locked Moved C / C++ / MFC
c++comquestion
4 Posts 4 Posters 1 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

    Hi, I'm trying to write a small application (www.aspestrand.com) that sits in the system tray and is hidden on start up. I've tried a lot of different things like setting the style before creation to be not visible, etc... but the best i can get is the dialog flashing on the screen once before it gets the message to hide which i post OnInitDialog() BOOL CReminderDlg::OnInitDialog() { CMenuDlg::OnInitDialog(); // some initialization .......................... // hide window PostMessage(WM_COMMAND, IDC_HIDE); // other initialization .......................... return TRUE; } void CReminderDlg::OnHide() { ShowWindow(SW_HIDE); } Is there a way to have the dialog not show unless i call ShowWindow(SW_NORMAL) on it? The dialog is set up never to show up on the task bar. thanks Bryn Aspestrand

    R J K 3 Replies Last reply
    0
    • L Lost User

      Hi, I'm trying to write a small application (www.aspestrand.com) that sits in the system tray and is hidden on start up. I've tried a lot of different things like setting the style before creation to be not visible, etc... but the best i can get is the dialog flashing on the screen once before it gets the message to hide which i post OnInitDialog() BOOL CReminderDlg::OnInitDialog() { CMenuDlg::OnInitDialog(); // some initialization .......................... // hide window PostMessage(WM_COMMAND, IDC_HIDE); // other initialization .......................... return TRUE; } void CReminderDlg::OnHide() { ShowWindow(SW_HIDE); } Is there a way to have the dialog not show unless i call ShowWindow(SW_NORMAL) on it? The dialog is set up never to show up on the task bar. thanks Bryn Aspestrand

      R Offline
      R Offline
      Robert A T Kaldy
      wrote on last edited by
      #2

      The dialog cannot be shown, unless it's created. Didn't you forget to remove CReminderDlg::DoModal() from InitInstance code? Robert-Antonio "I launched Norton Commander and saw, drive C: on the left, drive C: on the right...Damn, why I need two drives C:??? So I formatted one..."

      1 Reply Last reply
      0
      • L Lost User

        Hi, I'm trying to write a small application (www.aspestrand.com) that sits in the system tray and is hidden on start up. I've tried a lot of different things like setting the style before creation to be not visible, etc... but the best i can get is the dialog flashing on the screen once before it gets the message to hide which i post OnInitDialog() BOOL CReminderDlg::OnInitDialog() { CMenuDlg::OnInitDialog(); // some initialization .......................... // hide window PostMessage(WM_COMMAND, IDC_HIDE); // other initialization .......................... return TRUE; } void CReminderDlg::OnHide() { ShowWindow(SW_HIDE); } Is there a way to have the dialog not show unless i call ShowWindow(SW_NORMAL) on it? The dialog is set up never to show up on the task bar. thanks Bryn Aspestrand

        J Offline
        J Offline
        Jim Howard
        wrote on last edited by
        #3

        Take a look Chris's TrayCalender application. It does exactly what you want I think.

        1 Reply Last reply
        0
        • L Lost User

          Hi, I'm trying to write a small application (www.aspestrand.com) that sits in the system tray and is hidden on start up. I've tried a lot of different things like setting the style before creation to be not visible, etc... but the best i can get is the dialog flashing on the screen once before it gets the message to hide which i post OnInitDialog() BOOL CReminderDlg::OnInitDialog() { CMenuDlg::OnInitDialog(); // some initialization .......................... // hide window PostMessage(WM_COMMAND, IDC_HIDE); // other initialization .......................... return TRUE; } void CReminderDlg::OnHide() { ShowWindow(SW_HIDE); } Is there a way to have the dialog not show unless i call ShowWindow(SW_NORMAL) on it? The dialog is set up never to show up on the task bar. thanks Bryn Aspestrand

          K Offline
          K Offline
          krithika_Ramanujam
          wrote on last edited by
          #4

          Hi I think u can control this is InitInstance() of ur app class. Thanks Krithika

          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