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. Main frame and Child frame

Main frame and Child frame

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
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.
  • K Offline
    K Offline
    Kiethnt
    wrote on last edited by
    #1

    Dear all. Now I doing a project with MFC, so I would like ask you how to call child frame with any location (x, y) in the Main frame. Notice that when I called the child frame No.1, it locates at the left corner of Main frame and when I continue to call the child frame No.2, it appears at the same location of child frame No.2. Thank in advance all.

    C K 2 Replies Last reply
    0
    • K Kiethnt

      Dear all. Now I doing a project with MFC, so I would like ask you how to call child frame with any location (x, y) in the Main frame. Notice that when I called the child frame No.1, it locates at the left corner of Main frame and when I continue to call the child frame No.2, it appears at the same location of child frame No.2. Thank in advance all.

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      What about SetWindowPos? :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

      1 Reply Last reply
      0
      • K Kiethnt

        Dear all. Now I doing a project with MFC, so I would like ask you how to call child frame with any location (x, y) in the Main frame. Notice that when I called the child frame No.1, it locates at the left corner of Main frame and when I continue to call the child frame No.2, it appears at the same location of child frame No.2. Thank in advance all.

        K Offline
        K Offline
        Kiethnt
        wrote on last edited by
        #3

        First the child frame will be locate at pixel 0x0 and then call the seconde chid frame at position 320x0. I'm just strt with VC++ so please show me more detail thank very much all

        M 1 Reply Last reply
        0
        • K Kiethnt

          First the child frame will be locate at pixel 0x0 and then call the seconde chid frame at position 320x0. I'm just strt with VC++ so please show me more detail thank very much all

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          Something like this? CRect WindowRect; pChildFrameWnd1->GetWindowRect(&WindowRect); pChildFrameWnd1->MoveWindow(0, 0, WindowRect.Width(), WindowRect.Height()); pChildFrameWnd2->GetWindowRect(&WindowRect); pChildFrameWnd2->MoveWindow(320, 0, WindowRect.Width(), WindowRect.Height()); Mark

          "If you can dodge a wrench, you can dodge a ball."

          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