Janelas flutuantes no próximo lançamento do MetaTrader 5 - página 2

 
O terminal está ficando melhor!
 
Sergey Savinkin:
Será possível reduzir/ocultar armações de janelas grossas para economizar espaço?

Você pode verificar com estes roteiros. Eles estão trabalhando agora.

Código para remover os quadros

//#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);
   }
}

O código para colocar os quadros de volta.

//#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);
   }
}
Arquivos anexados:
 
Alexey Viktorov:

Você pode verificar com estes roteiros. Eles estão trabalhando agora.

Código para remover os quadros

O código para colocar os quadros de volta.

Obrigado. Mas isso provavelmente precisará ser executado toda vez que o terminal for iniciado? Também em todos os gráficos.

 

ótimas notícias.

especialmente para o comércio a partir de painéis.

 
Sergey Savinkin:

Obrigado. Mas isso provavelmente teria que ser executado toda vez que o terminal fosse ligado? Também em todos os gráficos.

Não em todos os gráficos, isso é certo. Eu o tinha para o MT4 e para todas as janelas simultaneamente e para cada janela separadamente. Mas, por tentativa e erro, refiz apenas estes para o MT5. Porém, não prestei atenção a eles ao reiniciar o terminal. De alguma forma, eu não mantenho várias janelas abertas e praticamente não uso estes scripts.

 

Sempre no topo provavelmente será feito, mas não transparência. Ainda não vamos tocar nas esquadrias das janelas.

O controle do estado da janela é quando você mesmo desenha tudo sobre a tela ou objetos.

 
Renat Fatkhullin:

Muito provavelmente, faremos sempre por cima, mas não por transparência. Por enquanto, não vamos tocar na moldura da janela.

O controle do estado da janela é quando você mesmo desenha tudo sobre tela ou objetos.

Renat, ótimas notícias.

Será possível gerenciar janelas dentro de diferentes telas, como a MDI? Provavelmente faremos todos os tipos de Tile Horizontally e assim por diante.

 
Mesaoria:

Renat, ótimas notícias.

Será possível gerenciar janelas dentro de diferentes telas, como a MDI? Tile Horizontally e assim por diante.

É um trabalho manual, não planejamos automatizá-lo.
 
Vitaly Muzichenko:

E eu ainda tenho 17 anos :)

E você estará ganhando 17 vezes mais ))


 
Alexey Volchanskiy:

E você vai ganhar 17 vezes mais dinheiro ))

Não, seria apenas conveniente abrir os símbolos em tela cheia. Neste momento, se você tem mais de 4 gráficos abertos, é extremamente inconveniente analisar os gráficos, e isso em um monitor 27. Os símbolos de trabalho são 15 e para a análise de mercado preciso de 3 janelas adicionais - um total de 18 janelas.

Portanto, a separação das janelas é uma grande notícia!