remove all borders

 
Hi there, i found this script to remove all windows borders.
But infortunately, it does not work.

Can you please help me (or fix it for the community) ?
Regards

//#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 = (int)(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);
   }
}
 
Hello, have you fixed the script? I have the same problem.
 
dzmitry.zimin #:
Hello, have you fixed the script? I have the same problem.

No, I didn't tried yet.

 

without specific error messages or behaviors described, troubleshooting can be a bit generic

any else information?

 
Nguyen An Nguyen #:

without specific error messages or behaviors described, troubleshooting can be a bit generic

any else information?

No error , nothing.
It just does not work.