Print Page | Close Window

Assertion Occurs When Using SVG Icon with CXTPCont

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=24614
Printed Date: 18 November 2025 at 12:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Assertion Occurs When Using SVG Icon with CXTPCont
Posted By: hiro-ta
Subject: Assertion Occurs When Using SVG Icon with CXTPCont
Date Posted: 17 November 2025 at 8:04pm

I added a “change font color” button to a CXTPToolBar. The code is as follows:

int PEBookmarkCtrl::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl) { switch(lpCreateControl->nID) { case ID_BKCTRL_COLOR: CXTPControlPopupColor* pPopupColor = new CXTPControlPopupColor(); CXTPPopupBar* pColorBar = (CXTPPopupBar*)CXTPPopupToolBar::CreateObject(); pColorBar->GetControls()->Add(new CXTPControlButtonColor(), ID_BKCTRL_COLOR_NONE); pColorBar->GetControls()->Add(new CXTPControlColorSelector(), ID_BKCTRL_COLORSELECTOR); pColorBar->GetControls()->Add(new CXTPControlButtonColor(), ID_BKCTRL_COLOR_MORE); pPopupColor->SetCommandBar(pColorBar); pColorBar->EnableCustomization(FALSE); pColorBar->InternalRelease(); lpCreateControl->pControl = pPopupColor; return TRUE; } return FALSE; }

After changing the icon to an SVG, an assertion started occurring.
It happens when CXTPControlPopupColor::SetColor() is called in the ON_UPDATE_COMMAND_UI handler (see attached).
What should I do to fix this?





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