removing chart window border

 

Hello. I don't write codes but I have one that I would like to make a small modification to.

When I apply the script there is still a small border at the bottom and on the right side. Is it possible to remove those 2?


 

Code:

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

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start() {
  int iChartParent=GetParent(WindowHandle(Symbol(),0));    
  int iNewStyle = GetWindowLongA(iChartParent, GWL_STYLE) & (~(WS_BORDER | WS_DLGFRAME | WS_SIZEBOX));    
  if (iChartParent>0 && iNewStyle>0) {
    SetWindowLongA(iChartParent, GWL_STYLE, iNewStyle);
    SetWindowPos(iChartParent,0, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE| SWP_FRAMECHANGED);
  }
  return(0);
}

 Would be very happy if someone could help me out

 

Regards 

 

Thanks a lot!

How to remove borders from all charts via one script?