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. DS_CONTROL vs WS_EX_CONTROLPARENT

DS_CONTROL vs WS_EX_CONTROLPARENT

Scheduled Pinned Locked Moved C / C++ / MFC
questionvisual-studiowpf
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.
  • N Offline
    N Offline
    Nishad S
    wrote on last edited by
    #1

    Hi, What is the difference between DS_CONTROL and WS_EX_CONTROLPARENT? I know DS_CONTROL will remove the WS_CAPTION and WS_SYSMENU styles from the dialog. But I dont know if any other differences are there. Thanks in advance.

    - NS -

    I 1 Reply Last reply
    0
    • N Nishad S

      Hi, What is the difference between DS_CONTROL and WS_EX_CONTROLPARENT? I know DS_CONTROL will remove the WS_CAPTION and WS_SYSMENU styles from the dialog. But I dont know if any other differences are there. Thanks in advance.

      - NS -

      I Offline
      I Offline
      Iain Clarke Warrior Programmer
      wrote on last edited by
      #2

      Off memory, DS_CONTROL style governs what happens when you reach the end of the tab order of controls in a dialog. If it's not set, the tab order will wrap around. If it *is* set, the tab will pass to a window governed by the dialogs parent window. The documentation for WS_EX_CONTROLPARENT pretty much tells a normal window to do the tab order thing for it's children. I bet if you look at a normal dialog using spy++ you will see this bit is set. Iain.

      N 1 Reply Last reply
      0
      • I Iain Clarke Warrior Programmer

        Off memory, DS_CONTROL style governs what happens when you reach the end of the tab order of controls in a dialog. If it's not set, the tab order will wrap around. If it *is* set, the tab will pass to a window governed by the dialogs parent window. The documentation for WS_EX_CONTROLPARENT pretty much tells a normal window to do the tab order thing for it's children. I bet if you look at a normal dialog using spy++ you will see this bit is set. Iain.

        N Offline
        N Offline
        Nishad S
        wrote on last edited by
        #3

        But I am very much confused with this DS_CONTROL I have a dialog havning two buttons. And another dialog with two edit boxes. And in the OnInitDialog I have as follows. m_dlgctrl.Create( m_dlgctrl.IDD, this ); ModifyStyleEx( 0, WS_EX_CONTROLPARENT ); m_dlgctrl.ModifyStyleEx( 0, WS_EX_CONTROLPARENT ); m_dlgctrl.ModifyStyle( DS_CONTROL, 0 ); Now the child dialog has no DS_CONTROL. But the tab order quite fine. This proves that DS_CONTROL has no influence in tab setting?

        - NS -

        I 1 Reply Last reply
        0
        • N Nishad S

          But I am very much confused with this DS_CONTROL I have a dialog havning two buttons. And another dialog with two edit boxes. And in the OnInitDialog I have as follows. m_dlgctrl.Create( m_dlgctrl.IDD, this ); ModifyStyleEx( 0, WS_EX_CONTROLPARENT ); m_dlgctrl.ModifyStyleEx( 0, WS_EX_CONTROLPARENT ); m_dlgctrl.ModifyStyle( DS_CONTROL, 0 ); Now the child dialog has no DS_CONTROL. But the tab order quite fine. This proves that DS_CONTROL has no influence in tab setting?

          - NS -

          I Offline
          I Offline
          Iain Clarke Warrior Programmer
          wrote on last edited by
          #4

          I can do no better than to point to the explanation on Raymond Chen's blog (one of the first few google results for DS_CONTROL, by the way... http://blogs.msdn.com/oldnewthing/archive/2004/07/30/201988.aspx[^] "When you set the DS_CONTROL style on a dialog template (or set the WS_EX_CONTROLPARENT extended style on a regular window), a bunch of new rules kick in." I hope his article can help! Iain.

          N 1 Reply Last reply
          0
          • I Iain Clarke Warrior Programmer

            I can do no better than to point to the explanation on Raymond Chen's blog (one of the first few google results for DS_CONTROL, by the way... http://blogs.msdn.com/oldnewthing/archive/2004/07/30/201988.aspx[^] "When you set the DS_CONTROL style on a dialog template (or set the WS_EX_CONTROLPARENT extended style on a regular window), a bunch of new rules kick in." I hope his article can help! Iain.

            N Offline
            N Offline
            Nishad S
            wrote on last edited by
            #5

            Ya. I have already read that. I understood nothing more... :( That is why I posted this doubt.

            - NS -

            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