How to Merge objects so that when you seperate them by loose parts
When you used Ctrl + J, you joined the objects together so that the separate meshes were now part of the same object. In order for them to be part of the same mesh they need to be part of the same object AND connected from at least one vertex on your window mesh to your building mesh.

You can do this with the F key while two or more vertices are selected.

If you hover over a mesh in your scene and hit L it will highlight all the vertices on that mesh, this also works with Ctrl + L when you have a vertex selected.

You'll know your windows are a part of the building if you have everything deselected and hit L while your mouse is over your building and the selection includes the windows.