There seems to be an issue when calculating the offset in scrolled windows. my workaround looks like this.
//_x = ((this.size().width-hWnd.width)/2)+offsetX;
//_y = ((this.size().height-hWnd.height)/2)+offsetY;
_x = ((this.size().width-hWnd.width)/2);
_y = ((this.size().height-hWnd.height)/2);