The XSize property specifies the width, in pixels, of the window if a new window is created. For GUI processes, this is used ...

The XSize property specifies the width, in pixels, of the window if a new window is created. For GUI processes, this is used only the first time the new process calls CreateWindow to create an overlapped window if the nWidth parameter of CreateWindow is CW_USEDEFAULT.  Note, XSize and YSize cannot be specified independently.