Print Page | Close Window

[Closed] Dialog Problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=5070
Printed Date: 07 May 2024 at 5:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [Closed] Dialog Problem
Posted By: Simon HB9DRV
Subject: [Closed] Dialog Problem
Date Posted: 17 September 2006 at 2:49pm
I have a dialog inside a pane, I cannot for the life of me get the toolbar to have any size - it is not displayed, GetClientRect returns 0.

From the class declaration:


#define CLogbookBase CXTPDialogBase<CXTResizeDialog>

class CLogbookDlg : public CLogbookBase

CXTPToolBar*    m_pToolBar;


Here's the code in OnInitDialog, aim is to have the toolbar displayed on the left, I have tried top, everywhere!:


    //
    //    Initialise.
    //
    VERIFY(InitCommandBars());

    //
    //    Commadbars.
    //
    CXTPCommandBars* pCommandBars = GetCommandBars();

    m_pToolBar = pCommandBars->Add(_T("Standard"), xtpBarLeft);

    m_pToolBar->LoadToolBar(IDR_TOOLBAR_LOGBOOK_DLG);

    m_pToolBar->SetVisible(TRUE);
    m_pToolBar->EnableDocking(xtpFlagAlignLeft | xtpFlagHideWrap /* | xtpFlagStretched */);
    m_pToolBar->ModifyBarStyle(CBRS_GRIPPER, 0);

    if (pCommandBars->GetToolTipContext()->IsBalloonStyleSupported())
    {
        pCommandBars->GetToolTipContext()->SetStyle(xtpToolTipBalloon);
        pCommandBars->GetToolTipContext()->ShowTitleAndDescription(TRUE);
    }

    pCommandBars->GetCommandBarsOptions()->bShowPopupBarToolTips = FALSE;
    pCommandBars->GetCommandBarsOptions()->ShowKeyboardCues(xtpKeyboardCuesShowWindowsDefault);
    pCommandBars->GetCommandBarsOptions()->bShowExpandButtonAlways = false;

    RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_STATUS_BAR, 0);
   
    pCommandBars->RedrawCommandBars();




-------------
Simon HB9DRV



Replies:
Posted By: Simon HB9DRV
Date Posted: 18 September 2006 at 3:17am
BTW -  project is too big to send but I can supply classes etc.

-------------
Simon HB9DRV


Posted By: Oleg
Date Posted: 18 September 2006 at 3:57am
Hi,
 
Did you catch WM_SIZE?
 
need to catch, call base method, and call
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Simon HB9DRV
Date Posted: 18 September 2006 at 4:02am


Forgot RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0);

Have 8 hero points


-------------
Simon HB9DRV



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net