The meaning of a locked door or locked window depends on which side you were on in the dream.
If you were locked in, you may expect a change of location in your life.
If you were locked out, it represents some troubles of your own making.
If you dream that you are locked in but you break the lock and escape, you will overcome the obstacles that are facing you now.
If the lock in your dream is a padlock, this symbolizes the need to sort out some family or personal matters.