I found an example in that particular structure which is:
During a night-terror episode, the person will partially wake up screaming, moaning, or gasping for air.
It is clear that it means the first thing the person will do after waking up is screaming, moaning, or grasping for air.
I want to use the same structure but with the verb (dream):
I wake up dreaming of ...
As the process of dreaming is known as a fact that it happens during the person's sleep and stops the moment the person wakes up, would my sentence mean that the dream stopped immediately after waking up, or would it mean, like in the first example, the moment I wake up, I started dreaming?
I want to convey the first meaning.