The library can be connected using
#include <fxsaber\SubWindow.mqh>
All other files on this page provide examples/scenarios of library application; they are not needed for the operation of the library.
Features
// Getting the index of the chart subwindow based on coordinates int SUBWINDOW::Get( const long Chart_ID, const int X, const int Y ); // Deleting a chart subwindow bool SUBWINDOW::Delete( const long Chart_ID, const uint Index ); // Deleting all chart subwindows bool SUBWINDOW::DeleteAll( const long Chart_ID = 0 ); // Creating a copy of a chart subwindow bool SUBWINDOW::Copy( const long Chart_ID, const uint IndexSrc, const uint IndexDst ); // Changing the positions of chart subwindows bool SUBWINDOW::Swap( const long Chart_ID, const uint Index1, const uint Index2 );
Example
The library use examples/scenarios are attached to the description.
-
SubWindow_Copy.mq5
// Creates a copy of the subwindow, to which the script is attached -
SubWindow_Delete.mq5
// Deletes the subwindow, to which the script is attached -
SubWindow_DeleteAll.mq5
// Deletes all chart subwindows -
SubWindow_Manager.mq5
// Manages chart subwindows
Help:
Drag&Drop - Swap SubWindows
Drag&Drop+CTRL - Copy SubWindows
SHIFT+Click - Delete SubWindow
DELETE - Delete All SubWindows
ESCAPE - Exit

For a better understanding of how to use the library, here is a short source code:
#include <fxsaber\SubWindow.mqh> void OnStart() { SUBWINDOW::Swap(0, 1, 2); // On the current chart (0) we swap the first (1) and the second (2) subwindows }
Features
The use of the library on the zero subwindow (the chart) is unpredictable, because is a completely abnormal situation.