![]() |
HOWTO: Use SVG graphics in CXTPButton control |
Post Reply
|
| Author | |
mgampi
Senior Member
Joined: 14 July 2003 Status: Offline Points: 1210 |
Post Options
Thanks(0)
Quote Reply
Topic: HOWTO: Use SVG graphics in CXTPButton controlPosted: 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 |
|
![]() |
|
rdhd
Senior Member
Joined: 13 August 2007 Location: United States Status: Offline Points: 954 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 hours 59 minutes ago 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.
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |