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. docking a modeless dialog

docking a modeless dialog

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 Posts 3 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
    novachen
    wrote on last edited by
    #1

    Hi! I read some articles about docing control bar. But that isn't what i need. I create a modeless dialog in mainframe. it is fixed size (for example 128*128), and on top of all childframe(views). I hope the dialog has the docking capability to align itself to some corner of the mainframe. But don't know how to do it. I try MoveWindow to 0, 0 (left corner of mainframe), but it cover the toolbar! the client rect of mainframe including the area toolbar accupied. But childframe is smart to know the right size and position when it resize to largest. How can childframe know the exactly free space in mainframe? Any suggestion for me? Thank you!!

    S 1 Reply Last reply
    0
    • N novachen

      Hi! I read some articles about docing control bar. But that isn't what i need. I create a modeless dialog in mainframe. it is fixed size (for example 128*128), and on top of all childframe(views). I hope the dialog has the docking capability to align itself to some corner of the mainframe. But don't know how to do it. I try MoveWindow to 0, 0 (left corner of mainframe), but it cover the toolbar! the client rect of mainframe including the area toolbar accupied. But childframe is smart to know the right size and position when it resize to largest. How can childframe know the exactly free space in mainframe? Any suggestion for me? Thank you!!

      S Offline
      S Offline
      souldog
      wrote on last edited by
      #2

      What you want is called a dialog bar. Take a look at CDialogBar or look at this http://codeguru.earthweb.com/docking/devstudio_like_controlbar_2.shtml[^]

      N 1 Reply Last reply
      0
      • S souldog

        What you want is called a dialog bar. Take a look at CDialogBar or look at this http://codeguru.earthweb.com/docking/devstudio_like_controlbar_2.shtml[^]

        N Offline
        N Offline
        novachen
        wrote on last edited by
        #3

        sorry, what i wanna is just a modeless dialog not control bar. I write a large image's browser. There is a modeless dialog which show the overview of whole image. It is on top of all the views. Its size is about 200*200, if I take a docking control bar, it will take the space 1024*200 that waste two much space. It just like photoshop, the panels of all kind tool on top of image. But I wanna my modeless dialog has a docking capability. In fact, it is also acceptable to make this dialog just on the left corner of the free space in mainframe. But I need the rect in the mainframe beside the toolbar, for GetClientRect doesn't get rid of the space toolbar occupied.

        F 1 Reply Last reply
        0
        • N novachen

          sorry, what i wanna is just a modeless dialog not control bar. I write a large image's browser. There is a modeless dialog which show the overview of whole image. It is on top of all the views. Its size is about 200*200, if I take a docking control bar, it will take the space 1024*200 that waste two much space. It just like photoshop, the panels of all kind tool on top of image. But I wanna my modeless dialog has a docking capability. In fact, it is also acceptable to make this dialog just on the left corner of the free space in mainframe. But I need the rect in the mainframe beside the toolbar, for GetClientRect doesn't get rid of the space toolbar occupied.

          F Offline
          F Offline
          FearlessBurner
          wrote on last edited by
          #4

          The easiest method of getting the available rectangle that you can use to position your modeless window is like this: CRect rcAvailable; RepositionBars(0, 0xffff, AFX_IDW_PANE_FIRST, reposQuery, &rcAvailable ); rcAvailable then contains the client rectangle without the toolbars. Hope this helps.

          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