I'm writing an ACSIL/C++ program that runs in Sierra Chart. I'm trying to open a modeless dialog box from a Shortcut Menu item. The dialog box would accept text input that gets converted into floats, and then that is stored in a global variable so other Sierra Chart programs can use the values.
I'm using the windows API/visual c++. I understand the basics of message loops and dialog/window procedures. I also already have dialog resource templates design through the Dialog Editor.
What I'm stuck on now is to implement it. I'm especially confused on how to implement the message loop. When I tried putting the loop in the click event of the Short cut menu item inside the ACSIL Study Function, I made Sierra Chart crash.
I'm also confused on how to get the window handle. The owner should be the main Serra Chart window, but how do I get the handle? Should I use the windows get foreground handle function that is out there?
Could I get a general overview and steps on how to go about setting this up?
Are you sure that you need this loop with GetMessage ?
What happens when you remove it ?
In a normal Windows program you have this kind of loop only in the WinMain function.
Also, as it turns out I do not need a message loop because Sierra Chart handles it. Sierra Chart also provides a variable to get the main window handle.