stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Chart minimising in CrapQl4
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5181
Page 1 of 1
Author:  SteveHopwood [ Wed May 17, 2017 7:44 pm ]
Post subject:  Chart minimising in CrapQl4

One for the Proper Coders here.

I would love to give users of my DFC Dashboard EA the option to have each newly-opened chart starting minimised.

Any of you Clever Clogs know how to do this?

:xm:
Author:  renexxxx [ Thu May 18, 2017 12:43 am ]
Post subject:  Chart minimising in CrapQl4

SteveHopwood ยป Thu May 18, 2017 5:44 am wrote:One for the Proper Coders here.

I would love to give users of my DFC Dashboard EA the option to have each newly-opened chart starting minimised.

Any of you Clever Clogs know how to do this?

:xm:
Steve,

Unfortunately, we need the help of the WinAPI for this. This code below seems to work:

Code: Select all

bool chartMinimize(long chartID = 0) {

   if (chartID == 0) chartID = ChartID();
   
   int chartHandle = (int)ChartGetInteger( chartID, CHART_WINDOW_HANDLE, 0 );
   int chartParent = GetParent(chartHandle);
   
   return( ShowWindow( chartParent, SW_FORCEMINIMIZE ) );
}
See attached code for a test script that first minimizes all windows, waits and then maximizes them all again.

Hopes that this is of any use to you.
Author:  SteveHopwood [ Thu May 18, 2017 8:39 am ]
Post subject:  Chart minimising in CrapQl4

Fantastic Rene. Thanks very much. :clap: :clap: :clap: :clap: :clap: :clap: :clap:

:xm:
All times are UTC Page 1 of 1