While drawing a door/window, the reference point is changed to be on the wall bottom, top or axis with the Change Distance Point command. This command is also executed by pressing the 6 key on the keyboard.

Location of Change Distance Point Command

You can access it from the ODT Door/Window toolbar.

Wall top

Wall bottom