You may shrink ext4 partitions only when they are unmounted (enlarging would work also at mounted state) with gParted, to free unpartitioned space for Windows. But therefore, you must have enough unused space inside the partition.
Step-by-step: (note: inscriptions may vary, as I translate it from the German version)
- Boot your machine from an Ubuntu live CD or USB.
- Run gParted.
- Select your Ubuntu partition on the HDD, right-click it and chose something like "Move/resize..."
- Change "free space before" to 0.
Change "new size" to 256000MB. (500GB/2=250GB=256000MB; whole Maths done :D)
Change "free space after" to 256000MB. (or equal to new size, if it's smaller)
Press "move/resize" button.
This will NOT perform the task, but show it in a queue at the bottom of the window.
I think you should finish here and don't create and format a partition for Windows, as it might be easier if you just present it the unpartitioned space and let it arrange its partitions itself. It sometimes uses e.g. some small boot/recovery partitions which I am not sure about how to configure them properly.
- Before exiting gParted you must make gParted perform the task you entered. To do this, click on the green tick symbol (or in Edit-menu, or hit Ctrl+Enter). This will send it to work and hopefully not make it throw any errors.
- If it succeeded, exit gParted, shut down live-Ubuntu, insert your Win installation cd and reboot.
If you encounter any errors or have more questions, feel free to leave me a comment. Hope this works for you anyway. Greetings and see you!