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. MFC dialog problem

MFC dialog problem

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++help
5 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.
  • B Offline
    B Offline
    Beer
    wrote on last edited by
    #1

    Hi, I created a dialog with the mfc app creator, then created a non modal dialog from within that dialog class with the extended style WS_EX_APPWINDOW applied on the initdialog like hmmm... ModifyStyleEx(0, WS_EX_APPWINDOW); This gives me a taskbar space for the new non-modal window. BUT, when I minimize the main modal app dialog, it also minimizes the non-modal window. I tried catching the window messages to the non-modal with pretranslate message, but there is no message when it's minimized, or when it's restored. No WM_SIZE or nothing. It's almost like MFC magic. I'm guessing this is some kind of wierd undocumented message mapping we can't see in the source SRC files??? So, how do i stop MFC from taking control of non-modal dialogs with the main dialog window in a dialog based app? PS- I also tried setting the parent to null, but it did nothing. hey

    B R 3 Replies Last reply
    0
    • B Beer

      Hi, I created a dialog with the mfc app creator, then created a non modal dialog from within that dialog class with the extended style WS_EX_APPWINDOW applied on the initdialog like hmmm... ModifyStyleEx(0, WS_EX_APPWINDOW); This gives me a taskbar space for the new non-modal window. BUT, when I minimize the main modal app dialog, it also minimizes the non-modal window. I tried catching the window messages to the non-modal with pretranslate message, but there is no message when it's minimized, or when it's restored. No WM_SIZE or nothing. It's almost like MFC magic. I'm guessing this is some kind of wierd undocumented message mapping we can't see in the source SRC files??? So, how do i stop MFC from taking control of non-modal dialogs with the main dialog window in a dialog based app? PS- I also tried setting the parent to null, but it did nothing. hey

      B Offline
      B Offline
      Beer
      wrote on last edited by
      #2

      alternatively, does anybody out there have a doc with the internal message mapping of MFC dialogs i could take a look at? I can't get why it doesn't so much as send a message to the 2nd dialog when it's magically minimized and the taskbar space is removed. It seems wrong. hey

      1 Reply Last reply
      0
      • B Beer

        Hi, I created a dialog with the mfc app creator, then created a non modal dialog from within that dialog class with the extended style WS_EX_APPWINDOW applied on the initdialog like hmmm... ModifyStyleEx(0, WS_EX_APPWINDOW); This gives me a taskbar space for the new non-modal window. BUT, when I minimize the main modal app dialog, it also minimizes the non-modal window. I tried catching the window messages to the non-modal with pretranslate message, but there is no message when it's minimized, or when it's restored. No WM_SIZE or nothing. It's almost like MFC magic. I'm guessing this is some kind of wierd undocumented message mapping we can't see in the source SRC files??? So, how do i stop MFC from taking control of non-modal dialogs with the main dialog window in a dialog based app? PS- I also tried setting the parent to null, but it did nothing. hey

        B Offline
        B Offline
        Beer
        wrote on last edited by
        #3

        please hey

        1 Reply Last reply
        0
        • B Beer

          Hi, I created a dialog with the mfc app creator, then created a non modal dialog from within that dialog class with the extended style WS_EX_APPWINDOW applied on the initdialog like hmmm... ModifyStyleEx(0, WS_EX_APPWINDOW); This gives me a taskbar space for the new non-modal window. BUT, when I minimize the main modal app dialog, it also minimizes the non-modal window. I tried catching the window messages to the non-modal with pretranslate message, but there is no message when it's minimized, or when it's restored. No WM_SIZE or nothing. It's almost like MFC magic. I'm guessing this is some kind of wierd undocumented message mapping we can't see in the source SRC files??? So, how do i stop MFC from taking control of non-modal dialogs with the main dialog window in a dialog based app? PS- I also tried setting the parent to null, but it did nothing. hey

          R Offline
          R Offline
          Ralph Varjabedian
          wrote on last edited by
          #4

          Try settings the parent to the desktop window, this should fix it use GetDesktopWindow(); Ralph Varjabedian Software Engineer

          B 1 Reply Last reply
          0
          • R Ralph Varjabedian

            Try settings the parent to the desktop window, this should fix it use GetDesktopWindow(); Ralph Varjabedian Software Engineer

            B Offline
            B Offline
            Beer
            wrote on last edited by
            #5

            ModifyStyleEx(0, WS_EX_APPWINDOW); SetParent(GetDesktopWindow()); Tried it this way in the non-modal initdialog. No Go Senior! Thanks for the suggestion, but I knew it wasn't going to work because i had previously tried setting it to NULL. The maindlg window of my dlg app is still minimizing it and removing the taskbar spot on minimization. And all the while sending No messages to the WndProc of the modeless dialog. I have a feeling that this is some powerful MFC voodoo that can only be resolved deep within the cavernous realms of the microsoft building. In other words unless somebody just knows, i don't know if it can be "figured out", since it's depriving any Wnd after the initial dialog of any type of messages about the altered window state hey

            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