Ventanas flotantes en la próxima versión de MetaTrader 5 - página 2

 
La terminal está mejorando.
 
Sergey Savinkin:
¿Será posible reducir/ocultar los marcos gruesos de las ventanas de los gráficos para ahorrar espacio?

Puedes comprobarlo con estos scripts. Ahora están trabajando.

Código para eliminar los marcos

//#property script_show_inputs
#import "user32.dll"
  int SetWindowLongA(int hWnd,int nIndex, int dwNewLong);
  int GetWindowLongA(int hWnd,int nIndex);
  int SetWindowPos(int hWnd, int hWndInsertAfter,int X, int Y, int cx, int cy, int uFlags);
  int GetParent(int hWnd);
  int GetTopWindow(int hWnd);
  int GetWindow(int hWnd, int wCmd);
#import

#define  GWL_STYLE         -16 
#define  WS_CAPTION        0x00C00000 
#define  WS_BORDER         0x00800000
#define  WS_SIZEBOX        0x00040000
#define  WS_DLGFRAME       0x00400000
#define  SWP_NOSIZE        0x0001
#define  SWP_NOMOVE        0x0002
#define  SWP_NOZORDER      0x0004
#define  SWP_NOACTIVATE    0x0010
#define  SWP_FRAMECHANGED  0x0020
#define  GW_CHILD          0x0005
#define  GW_HWNDNEXT       0x0002

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int OnStart() 
{
   int hChartParent = GetParent((int)ChartGetInteger(ChartID(), CHART_WINDOW_HANDLE));    
   int hMDIClient = GetParent(hChartParent); 
   int hChildWindow = GetTopWindow(hMDIClient);
   while (hChildWindow > 0)
   {
      RemoveBorderByWindowHandle(hChildWindow);
      hChildWindow = GetWindow(hChildWindow, GW_HWNDNEXT);
   }
 
   
   return(0);
}
void RemoveBorderByWindowHandle(int hWindow)
{
   int iNewStyle = GetWindowLongA(hWindow, GWL_STYLE) & (~(WS_BORDER | WS_DLGFRAME | WS_SIZEBOX));    
   if (hWindow>0 && iNewStyle>0) 
   {
      SetWindowLongA(hWindow, GWL_STYLE, iNewStyle);
      SetWindowPos(hWindow,0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_FRAMECHANGED);
   }
}

El código para volver a poner los marcos.

//#property script_show_inputs
#import "user32.dll"
  int SetWindowLongA(int hWnd,int nIndex, int dwNewLong);
  int GetWindowLongA(int hWnd,int nIndex);
  int SetWindowPos(int hWnd, int hWndInsertAfter,int X, int Y, int cx, int cy, int uFlags);
  int GetParent(int hWnd);
  int GetTopWindow(int hWnd);
  int GetWindow(int hWnd, int wCmd);
#import

#define  GWL_STYLE         -16 
#define  WS_CAPTION        0x00C00000 
#define  WS_BORDER         0x00800000
#define  WS_SIZEBOX        0x00040000
#define  WS_DLGFRAME       0x00400000
#define  SWP_NOSIZE        0x0001
#define  SWP_NOMOVE        0x0002
#define  SWP_NOZORDER      0x0004
#define  SWP_NOACTIVATE    0x0010
#define  SWP_FRAMECHANGED  0x0020
#define  GW_CHILD          0x0005
#define  GW_HWNDNEXT       0x0002

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int OnStart() 
{
   int hChartParent = GetParent((int)ChartGetInteger(ChartID(), CHART_WINDOW_HANDLE));    
   int hMDIClient = GetParent(hChartParent); 
   int hChildWindow = GetTopWindow(hMDIClient);
   while (hChildWindow > 0)
   {
      RemoveBorderByWindowHandle(hChildWindow);
      hChildWindow = GetWindow(hChildWindow, GW_HWNDNEXT);
   }
 
   
   return(0);
}
void RemoveBorderByWindowHandle(int hWindow)
{
   int iNewStyle = GetWindowLongA(hWindow, GWL_STYLE) | ((WS_BORDER | WS_DLGFRAME | WS_SIZEBOX));    
   if (hWindow>0 && iNewStyle>0) 
   {
      SetWindowLongA(hWindow, GWL_STYLE, iNewStyle);
      SetWindowPos(hWindow,0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_FRAMECHANGED);
   }
}
Archivos adjuntos:
 
Alexey Viktorov:

Puedes comprobarlo con estos scripts. Ahora están trabajando.

Código para eliminar los marcos

El código para volver a poner los marcos.

Gracias. Pero es probable que esto tenga que ejecutarse cada vez que se inicie el terminal. También en cada gráfico.

 

una gran noticia.

especialmente para el comercio desde los paneles.

 
Sergey Savinkin:

Gracias. Pero esto probablemente tendría que ser ejecutado cada vez que se inicie el terminal? También en cada gráfico.

No en todos los gráficos, eso es seguro. Lo tenía para MT4 y para todas las ventanas simultáneamente y para cada ventana por separado. Pero por ensayo y error he rehecho sólo estos para MT5. Sin embargo, no les presté atención al reiniciar el terminal. De alguna manera, no mantengo varias ventanas abiertas y prácticamente no uso estos scripts.

 

Probablemente se hará siempre en la parte superior, pero no la transparencia. Todavía no tocaremos los marcos de las ventanas.

El control del estado de la ventana es cuando usted mismo dibuja todo en el lienzo o en los objetos.

 
Renat Fatkhullin:

Lo más probable es que hagamos Siempre arriba, pero no la transparencia. No vamos a tocar el marco de la ventana por ahora.

El control del estado de la ventana es cuando usted mismo dibuja todo en el lienzo o en los objetos.

Renat, una gran noticia.

¿Será posible gestionar ventanas dentro de diferentes pantallas, como MDI? Probablemente hagamos todo tipo de azulejos horizontalmente y así sucesivamente.

 
Mesaoria:

Renat, una gran noticia.

¿Será posible gestionar ventanas dentro de diferentes pantallas, como MDI? Mosaico Horizontal y así sucesivamente.

Es un trabajo manual, no tenemos previsto automatizarlo.
 
Vitaly Muzichenko:

Y todavía tengo 17 años :)

Y ganarás 17 veces más ))


 
Alexey Volchanskiy:

Y ganarás 17 veces más dinero ))

No, sólo sería conveniente abrir los símbolos en pantalla completa. Ahora mismo, si tienes más de 4 gráficos abiertos, es extremadamente incómodo analizar los gráficos, y eso en un monitor de 27. Los símbolos de trabajo son 15 y para el análisis del mercado necesito 3 ventanas adicionales - un total de 18 ventanas.

Así que la separación de las ventanas es una gran noticia.