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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Issues with modeless dialogs

Issues with modeless dialogs

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
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.
  • V Offline
    V Offline
    vipin_nvk
    wrote on last edited by
    #1

    Hi I have two modeless dialogs. One dialog is a member variable of a CWnd class and the Create function is called on this dialog member variable. This dialog displays correctly. There is another dialog which is created as a pointer using new operator and Create is called on this dialog. There are issues with the second dialog on Windows 2003 with one of our clients. Wanted to know if there is a difference when a modeless dialog is created as a member variable of a Wnd and using new operator. Secondly, in both the cases the *pParent passed is NULL. Is there any known issue passing the parent window pointer as NULL, or it should be the applications main frame window or the Desktop window? Thanks

    C E A 3 Replies Last reply
    0
    • V vipin_nvk

      Hi I have two modeless dialogs. One dialog is a member variable of a CWnd class and the Create function is called on this dialog member variable. This dialog displays correctly. There is another dialog which is created as a pointer using new operator and Create is called on this dialog. There are issues with the second dialog on Windows 2003 with one of our clients. Wanted to know if there is a difference when a modeless dialog is created as a member variable of a Wnd and using new operator. Secondly, in both the cases the *pParent passed is NULL. Is there any known issue passing the parent window pointer as NULL, or it should be the applications main frame window or the Desktop window? Thanks

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      vipin_nvk wrote:

      There are issues with the second dialog on Windows 2003 with one of our clients.

      What kind of issues?

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

      V 1 Reply Last reply
      0
      • C Code o mat

        vipin_nvk wrote:

        There are issues with the second dialog on Windows 2003 with one of our clients.

        What kind of issues?

        > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

        V Offline
        V Offline
        vipin_nvk
        wrote on last edited by
        #3

        Painting issues where the frame of the window is not getting painted properly

        C A 2 Replies Last reply
        0
        • V vipin_nvk

          Painting issues where the frame of the window is not getting painted properly

          C Offline
          C Offline
          Code o mat
          wrote on last edited by
          #4

          Of course i can only talk for myself, but personally i don't think generally there are problems with creating the dialog class dynamically or passing NULL for the parent, i think this issue could very well be a specific one.

          > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

          1 Reply Last reply
          0
          • V vipin_nvk

            Hi I have two modeless dialogs. One dialog is a member variable of a CWnd class and the Create function is called on this dialog member variable. This dialog displays correctly. There is another dialog which is created as a pointer using new operator and Create is called on this dialog. There are issues with the second dialog on Windows 2003 with one of our clients. Wanted to know if there is a difference when a modeless dialog is created as a member variable of a Wnd and using new operator. Secondly, in both the cases the *pParent passed is NULL. Is there any known issue passing the parent window pointer as NULL, or it should be the applications main frame window or the Desktop window? Thanks

            E Offline
            E Offline
            Eytukan
            wrote on last edited by
            #5

            Can you show some piece of code?

            Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.

            1 Reply Last reply
            0
            • V vipin_nvk

              Hi I have two modeless dialogs. One dialog is a member variable of a CWnd class and the Create function is called on this dialog member variable. This dialog displays correctly. There is another dialog which is created as a pointer using new operator and Create is called on this dialog. There are issues with the second dialog on Windows 2003 with one of our clients. Wanted to know if there is a difference when a modeless dialog is created as a member variable of a Wnd and using new operator. Secondly, in both the cases the *pParent passed is NULL. Is there any known issue passing the parent window pointer as NULL, or it should be the applications main frame window or the Desktop window? Thanks

              A Offline
              A Offline
              Albert Holguin
              wrote on last edited by
              #6

              They should be exactly the same... it's possible that there's an old bug in that Windows version, but I'm not sure. There's nothing wrong with setting the parent to NULL, but you should really be using the real parent for more predictable behavior.

              1 Reply Last reply
              0
              • V vipin_nvk

                Painting issues where the frame of the window is not getting painted properly

                A Offline
                A Offline
                Albert Holguin
                wrote on last edited by
                #7

                Try posting a screen capture of what you're referring to. The drawing of the frame is almost entirely handled by the framework, so it might just be a Windows bug.

                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