Please see my comment to the question. Probably, you need to set a break point at certain place. Isn't it obvious that "Call stack" shows all calls up the stack, not down? I hope you understand it and can see from this debug window. It means, it shows you the calls which already led you to the break point, all calling functions. You cannot see what is called from a given point; essentially, what you need to see wasn't yet called. You can follow the execution using step-by-step debugging, but it may take too much time.
So, you have to put break-point to all places where
CDialog::DoModal
and examine the instance in all case, but it also might become too long. So, as you have (as far as I could understand), different dialog classes, you have to put a break point in some method of each class. But where? I guess, the problem is that this method is in the base class, so you cannot put different break points on your different terminal classes. What to do?
You can add some code specially for debugging. Pay attention that
CDialog::DoModal
is a virtual method:
http://msdn.microsoft.com/en-us/library/619z63f5.aspx[
^].
It means that you can override it in all your dialog classes in question, just for debugging purpose. Write some trivial implementation calling the base's
CDialog::DoModal
. The only purpose of it is to put a break point on this line, for each of your classes. This way, you will see where the calls are dispatched on certain action.
I tried to explain only some of the basic debugging technique; and they are not so easy to explain. It's easier to invent a debugging technique then to explain how it works in simple words, without demonstrating it. There are many others. They come up with some experience and logical thinking during debugging. Generally, try to do more analysis and logical thinking and less attempts, less of trial-and-error operations.
—SA