Purpose: To hide the ctabctrl label button, and use a drop-down box or menu to switch the ctabctrl label page. It looks like a single dialog box page, but in fact it is ctabctrl.
Some people may think this is not a bit Bt. In fact, I don't want to do such a thing. There is really no way. Now I want to change the multi-window interface created on the tab page.Code.
Implementation Method:
Use setpadding to set the size of the tag button and setitemsize to set the size of the tab.
The Code is as follows:
M_tab_main.setpadding (csize (-1000,-1000); // adjust this value as appropriate.
M_tab_main.setitemsize (csize (0, 0 ));
Is this code shameless? Haha, the height and width of the tag button are reduced by 1000 pixels, and the size of the tag button is 0.
This still doesn't work. The button is gone, but the original button is left blank, which is very indecent. The following code is OK.
Crect rect;
M_tab_main.getclientrect (& rect );
Rect. Top-= 20;
M_tab_main.movewindow (& rect );
Here, move ctabctrl up to 20 pixels. Because the height of the tag button is 24, but 24 is not allowed. If 24 is subtracted, the upper boundary of ctabctrl is removed, which is not elegant.
In this way, the goal is achieved.
Note: Because I only use the ctabctrl control in the main window, I move the ctabctrl control up and move it out of the window, so I cannot see the above part. However, if the ctabctrl and the main window are different in size, or the upper boundary of the upper boundary is not aligned with the upper boundary of the main window, the Movement will not work. In this case, you can place ctabctrl in a dialog box so that the ctabctrl size is the same as that of the dialog box. You can use this dialog box as a control to place it in the original ctabctrl position in the main window, in this way, the above Code is still feasible.