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