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. Invisible Dialog

Invisible Dialog

Scheduled Pinned Locked Moved C / C++ / MFC
7 Posts 4 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.
  • A Offline
    A Offline
    ajmalsiddiqi
    wrote on last edited by
    #1

    i developed an application dialog based.i want to hide dialog i mean,Dialog application should exist in background process but its dialog window should not be visible at the front end.In other words just dialog window should not be displayed but its process should exist. thanks ajmal siddiqi ajmalsiddiqui

    C B 2 Replies Last reply
    0
    • A ajmalsiddiqi

      i developed an application dialog based.i want to hide dialog i mean,Dialog application should exist in background process but its dialog window should not be visible at the front end.In other words just dialog window should not be displayed but its process should exist. thanks ajmal siddiqi ajmalsiddiqui

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      this->Showwindow(SW_HIDE); Christian Graus - Microsoft MVP - C++

      A D 2 Replies Last reply
      0
      • C Christian Graus

        this->Showwindow(SW_HIDE); Christian Graus - Microsoft MVP - C++

        A Offline
        A Offline
        ajmalsiddiqi
        wrote on last edited by
        #3

        hi sir.. i want as the dialog is created it should be hidden or as application is loaded dialog should be hidden.so sir to handle this situation where i should write this->ShowWindow(SW_HIDE); THANKS AJMAL ajmalsiddiqui

        1 Reply Last reply
        0
        • C Christian Graus

          this->Showwindow(SW_HIDE); Christian Graus - Microsoft MVP - C++

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          The problem here is that when CDialog::OnInitDialog() finishes it will call ShowWindow(SW_SHOW). The solution is to override OnWindowPosChanging() and remove the SWP_SHOWWINDOW flag.


          "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

          1 Reply Last reply
          0
          • A ajmalsiddiqi

            i developed an application dialog based.i want to hide dialog i mean,Dialog application should exist in background process but its dialog window should not be visible at the front end.In other words just dialog window should not be displayed but its process should exist. thanks ajmal siddiqi ajmalsiddiqui

            B Offline
            B Offline
            Bob Stanneveld
            wrote on last edited by
            #5

            Hello, In your init instance, your dialog is created and run modal! This means that you app only runs if your dialog exists. To change this behaviour, change the InitInstance() method to create a modeless dialog. Be sure to remove the visible style or call ShowWindow(SW_HIDE) in your OnInitDialog() method. Can you tell us why you need your window to be invisible? Maybe you are better off without a window! Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

            A 1 Reply Last reply
            0
            • B Bob Stanneveld

              Hello, In your init instance, your dialog is created and run modal! This means that you app only runs if your dialog exists. To change this behaviour, change the InitInstance() method to create a modeless dialog. Be sure to remove the visible style or call ShowWindow(SW_HIDE) in your OnInitDialog() method. Can you tell us why you need your window to be invisible? Maybe you are better off without a window! Behind every great black man...             ... is the police. - Conspiracy brother Blog[^]

              A Offline
              A Offline
              ajmalsiddiqi
              wrote on last edited by
              #6

              thanks sir for replying actually i make a multithrreaded mfc applicaion .it has my own functionality and i want to run it in background as a process just like a service.And i donot want any window should apear so user cannot interact with my application. ajmal ajmalsiddiqui

              D 1 Reply Last reply
              0
              • A ajmalsiddiqi

                thanks sir for replying actually i make a multithrreaded mfc applicaion .it has my own functionality and i want to run it in background as a process just like a service.And i donot want any window should apear so user cannot interact with my application. ajmal ajmalsiddiqui

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                So why not make a real service instead of a fake one? You'll be much happier with the results.


                "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

                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