Login Page - Create Account

Support Board


Date/Time: Sun, 08 Sep 2024 02:16:21 +0000



GDI - Select ChartText Font as default font

View Count: 1425

[2015-06-21 15:14:12]
ejtrader - Posts: 688
SC Team - I have been trying to select the default font used by the chart text into GDI based text objects and so far not successful.

Would you please let me know if there is any way I can get the same text into the GDI text font? Appreciate any input ( please don't mark it as User discussion ). Even better if you can update the default GDI example study to include this text font ). Just wanted to "avoid" creating a font for this and use Chart Text font by default for this ( indirect font).

I tried the following but no use.

SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT));
//SelectObject(hdc, GetStockObject(DEVICE_DEFAULT_FONT));
//SelectObject(hdc, GetStockObject(ANSI_FIXED_FONT));
//SelectObject(hdc, GetStockObject(OEM_FIXED_FONT));
//SelectObject(hdc, GetStockObject(SYSTEM_FONT));

Thanks
Date Time Of Last Edit: 2015-06-21 16:35:22
imagesierra_GDI_ChartText_font.jpg / V - Attached On 2015-06-21 15:12:47 UTC - Size: 30.73 KB - 418 views
[2015-06-21 16:42:28]
ejtrader - Posts: 688
If I use the createFont option to create the required font, I do get the desired(somewhat) effect but the size doesn't match. Wanted to avoid this createfont object if possible and use the charttext font somehow if it is available for GDI function.

Would you please see if you can support the function - WM_GETĀ­FONT - which might help in this case?

Thanks
Date Time Of Last Edit: 2015-06-22 06:02:39
imageSC_GDI_withCreateFont.jpg / V - Attached On 2015-06-21 16:42:19 UTC - Size: 30.14 KB - 365 views

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account