Print Page | Close Window

arrows again

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=8400
Printed Date: 21 February 2024 at 10:50pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: arrows again
Posted By: Сы&
Subject: arrows again
Date Posted: 11 October 2007 at 1:20am
Oleg! Thanks for the previous response, but i mean another arrows.

I create tollbar CXTPToolBar with 24x24 icons

CXTPToolBar* pOperationsBar = (CXTPToolBar*)pCommandBars->Add(_T("Operations"), xtpBarLeft);
    if (!pOperationsBar ||
        !pOperationsBar->LoadToolBar(IDR_TOOLBAR_OPERATIONS))
    {
        TRACE0("Failed to create toolbar\n");
        return -1;
    }
pOperationsBar->EnableDocking(xtpFlagAlignAny|xtpFlagFloating|xtpFlagStretched|xtpFlagHideWrap);

in OnCreateControl i adiing popup

if (lpCreateControl->nID == ID_UNDO)
    {
CXTPControlPopup* pPopup = new CXTPControlPopup();

        CXTPPopupBar* pBar = CXTPPopupToolBar::CreatePopupToolBar(GetCommandBars());
        pPopup->SetCommandBar(pBar);
....

pBar->GetControls()->Add(pControlCustom);
pBar->EnableCustomization(FALSE);
        pBar->DisableShadow();
        pBar->SetBorders(CRect(1, 1, 1, 1));
        pBar->InternalRelease();

        lpCreateControl->pControl = pPopup;

        return TRUE;
}

and my icon ID_UNDO is replaced by arrow




Replies:
Posted By: Oleg
Date Posted: 12 October 2007 at 8:22am
Hi,
 
replace CXTPControlPopup* pPopup = new CXTPControlPopup();
to
CXTPControlPopup* pPopup = CXTPControlPopup::CreateControlPopup(xtpControlButtonPopup);


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



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