Login Page - Create Account

Support Board


Date/Time: Thu, 13 Dec 2018 07:30:47 +0000



ACSIL - Is there a flag which indicates a chart has become visible?

Support Request:
[2018-12-07 14:47:24]
BlakJak - Posts: 39
I have a study using GDI and to be efficient I do not always redraw the entire screen unless it has been scrolled or resized. However, I do need to redraw the full GDI screen if the chart becomes visible (after being minimized or being hidden by another ChartBook for some time).

Is there a flag in ACSIL that would let me know that the chart has become visible so that I know I need to redraw the full chart GDI?
[2018-12-07 18:04:22]
Sierra Chart Engineering - Posts: 66930
No, there is not. But the GDI drawing function that Sierra Chart calls, that you have implemented, is given the chart window handle (HWND WindowHandle) and you can remember the window state at each call into a persistent variable and then check for changes.

Refer to:
https://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Functions.html#scGetPersistentInt
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2018-12-07 19:17:53]
BlakJak - Posts: 39
Just a question on how to use this. Will my GDI function be called if the window state is no longer visible? My idea is to put a check inside the GDI function to set / check the previous state of the window, however this will not work if the GDI function is not called when WS_VISIBLE flag is not set on the window.
[2018-12-07 21:54:40]
Sierra Chart Engineering - Posts: 66930
Probably not because a chart is not drawn if it is not visible. But run a test and see. So if it is not called, not sure what the solution would be.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2018-12-08 06:59:43]
BlakJak - Posts: 39
Will the study be called if the chart is still open but in the background? If so, I could manage the flag in the main study loop.
[2018-12-10 20:21:18]
Sierra Chart Engineering - Posts: 66930
Yes.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.

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

Login


Login Page - Create Account