In general you create a modeless dialogue in a function, and then return to do other processing, when you close the dialogue box it usually frees up the memory allocated on the heap itself.
If the dialogue box memory was on the stack, then it would be lost when you returned form the function.
Allocation on the stack is efficient, and if the thread creating the box waits for the box to be closed before proceeding, there is no real reason to complicate life by creating the box on the heap, and then remembering to delete the box when you have completed.