Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 03:36:53 +0000



Post From: How to get modeless dialog box working? Code Provided.

[2019-02-10 12:07:07]
norvik_ - Posts: 106
Hi,
Is this StackOverflow answer (https://stackoverflow.com/a/12491691/10713257) the way to do it for using SendMessage or is there something extra that also needs to be taken into account for Sierra Chart?
Yes.

Keep in mind that calling SCStudyInterface functions from your dialog in most cases will have no effect. I don't know exactly why. You only can read and write SCStudyInterface variables.

Could you provide an code example for using std::mutex for writing SCStudyInterface values in Dialog instance?

For example you have an initial statement in SCSFExport:

sc.DataStartIndex = sc.IndexOfFirstVisibleBar;
sc.SimpleMovAvg(sc.Close, Average, sc.Input[0].IntValue);

You can change it in dialog:

void CMyDialog::ChangeDataStartIndex(int NewIndex)
{
std::mutex mk;
std::lock_guard<std::mutex> locker(mk);
m_pSCInterface->DataStartIndex = NewIndex;
}

Give me a week, I will post at this thread example of simple custom trading panel.
Also some things about additional windows for SC.
Date Time Of Last Edit: 2019-02-10 12:40:53