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. Detachable tab control...

Detachable tab control...

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

    Hi I want to create a tab control in such a wany that when user drags the tab button it should display it as separate dialog box. Also if user drags a dialog box on to that, it should set as a tab button. Any idea how this can be done? Regards Neha

    A M 2 Replies Last reply
    0
    • N Neha

      Hi I want to create a tab control in such a wany that when user drags the tab button it should display it as separate dialog box. Also if user drags a dialog box on to that, it should set as a tab button. Any idea how this can be done? Regards Neha

      A Offline
      A Offline
      Antti Keskinen
      wrote on last edited by
      #2

      You must do it completely yourself. You could see the MFC source code of the CWnd class for the basic window functionality. For the docking stuff, always when your window is moved near enough to the docking area, the drag rectangle is forced to a certain place/size and is not moved with the mouse until the cursor is enough far away from the 'zone'. For the tab controls, whenever the window is in the zone, you create a new rectangle that looks like a tab. Then you place this 'outlined' tab control next to the existing ones. If user releases the mouse button while in this mode, a new tab page gets created. Basically, what you are asking has not been implemented yet, so there is little ready source code available. You must gather bits and pieces, experiment and succeed through trial & error. Best of luck, though.. -Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.

      1 Reply Last reply
      0
      • N Neha

        Hi I want to create a tab control in such a wany that when user drags the tab button it should display it as separate dialog box. Also if user drags a dialog box on to that, it should set as a tab button. Any idea how this can be done? Regards Neha

        M Offline
        M Offline
        Marcello
        wrote on last edited by
        #3

        Hi, I was thinking to do the same. Please, if you do any code for it, even not perfect, can you send it to me ( if yes I will give you my email address ) ? If I will implement on my side I can give my code to you. Unfortuantely though, I am using the VCF library ( which makes this work much simpler than using MFC ), so I am not sure my code will fit your needs. Cheers, Marcello

        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