Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 06:36:22 +0000



[Programming Help] - Drawing text using GDI

View Count: 1909

[2018-05-24 10:10:17]
Zdislav - Posts: 73
Hi Support.

I am exploring your GDI example. Everything works except when I try to draw a text using Win32API functions. It appears always at the bottom right corner at the time scale region. I specified my RECT in which it should apear but it has no effect. I tried DrawText function and TextOut function. The text is stacking in right-to-left order. I am using version 1743. What am I doing wrong?

Zdislav
Private File
[2018-05-24 17:46:56]
Sierra Chart Engineering - Posts: 104368
Just make sure you are specifying the proper coordinates when using the GDI functions.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-08-08 17:52:08]
BlakJak - Posts: 108
Hi Zdislav,

Did you solve this? I have exactly the same problem with TextOut. I cannot even get DrawText to put anything on the screen.

It is very strange as within the same code block I am drawing circles with the same coordinates perfectly well. It's almost as if they do not use the same coordinate system.

Any help you can give will be really appreciated.

Rgds,
David
[2018-08-11 07:25:24]
BlakJak - Posts: 108
I got the answer in another thread. You have to make sure you call SetTextAlign as per the answer provided in Adding Text with GDI Function to Study

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

Login

Login Page - Create Account