Задайте вопросЗадайте вопрос
 

ОтвеченоLimit Minimum size of CDockablePane

Ответы

  • 3 июля 2009 г. 8:57Wesley YaoMSFT, МодераторМедали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     ОтвеченоС кодом
    Well, when we dock a pane to another one, framework will generate a CTabbedPane which is the container for them, we will also need SetMinSize() for it.  The function to create this CTabbedPane is "CreateTabbedPane()", you could try to override it and SetMinSize() in it, i.e.:

    CTabbedPane* MyDockablePane::CreateTabbedPane()
    {
        CTabbedPane* pTabbedBar = CDockablePane::CreateTabbedPane();
        pTabbedBar->SetMinSize(CSize(200, 200)); //Here is that
    
        return pTabbedBar;
    }
    

    Note: But we cannot modify the default CDockablePane's method, so when we dock a derived pane to a "native CDockablePane", it will still act the result you've seen.

    Sincerely,
    Wesley
    Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Помечено в качестве ответаHarsh Shankar 3 июля 2009 г. 9:04
    •  

Все ответы