voidOnChartEvent(constint id,constlong& lparam,constdouble& dparam,conststring& sparam)
{
if (id == CHARTEVENT_KEYDOWN)
{
Print(TerminalInfoInteger(TERMINAL_KEYSTATE_CONTROL));
}
}
On a key down event, it will print the states of the Ctrl key. It works correctly when the chart is docked, and prints -128 when Ctrlkey is pressed. But when I undock the chart and press Ctrlkey it always prints 0.
On a key down event, it will print the states of the Ctrl key. It works correctly when the chart is docked, and prints -128 when Ctrl key is pressed. But when I undock the chart and press Ctrl key it always prints 0.
Does anyone know how to solve this?