Colloportus can probably be used on windows since Alohomora, the counter-charm, can be.
In the books, we see Alohomora, a charm that counters Colloportus, used on windows.
“Stand back!’ Hermione called to him, and she took out her wand, still gripping the back of Harry’s robes with her left hand.
‘Alohomora!’
The window sprang open.”
- Harry Potter and the Prisoner of Azkaban, Chapter 21 (Hermione's Secret)
Presumably therefore Colloportus would be able to be used on windows as well.
Harry does try using Alohomora, the charm Hermione opened Regulus's door with, on Salazar Slytherin's locket. Hermione is shown opening the door with Alohomora.
“Let’s find out,’ said Harry. He pushed the door: it was locked. Hermione pointed her wand at the handle and said, ‘Alohomora.’ There was a click, and the door swung open.”
- Harry Potter and the Deathly Hallows, Chapter 10 (Kreacher's Tale)
Then Harry is later said to use "the charm Hermione has used to open Regulus's bedroom door" on Salazar Slytherin's locket when he's trying to open it, indicating he used Alohomora. That could mean either that Alohomora (and possibly Colloportus as well) can be used on other objects with locks, or that Harry doesn't know how Alohomora works. Both seem possible.
“Mastering himself again, he tried to prise the locket apart with his fingers, then attempted the charm Hermione had used to open Regulus’s bedroom door. Neither worked. He handed the locket back to Ron and Hermione, each of whom did their best, but were no more successful at opening it than he had been.”
- Harry Potter and the Deathly Hallows, Chapter 14 (The Thief)
Pottermore says Alohomora can be used on 'locked objects' so Colloportus may work too.
The Pottermore fact file for Alohomora says it opens locked doors, windows, and objects. This may mean that Colloportus can work the same way. There isn't currently a corresponding fact file on Colloportus, so this is the most information available.
Alohomora fact file
INCANTATION
Alohomora
PURPOSE
To open a locked door, window or object