Print Page | Close Window

HOWTO: Use SVG graphics in CXTPButton control

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=24610
Printed Date: 30 November 2025 at 1:17pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: HOWTO: Use SVG graphics in CXTPButton control
Posted By: mgampi
Subject: HOWTO: Use SVG graphics in CXTPButton control
Date Posted: 10 October 2025 at 1:18pm
Hi;

How can I use a SVG graphic in a CXTPButton derived control?

TIA


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022



Replies:
Posted By: rdhd
Date Posted: 07 November 2025 at 4:31pm
We use Direct2D to render the SVG to a bitmap taking into account any padding I find the the CJ drawing code and set the bitmap on the button.

We have been using D2D for a good while now and render bitmaps, icons etc. to put on our ribbon, dialogs, image lists etc. If CJ's SVG support has any api to render a bitmap or icon you can set the bitmap or icon on a button or static and use BS_BITMAP or SS_BITMAP (/ICON).

Does present a bit of pain when supporting all the Windows DPI contexts since they are pre-rendered.



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