Discussion:
Understanding OnSize()
(too old to reply)
Arpit
2006-08-24 07:19:07 UTC
Permalink
Hi experts.

I m a NewBee For MFC.I have made an sdi application. i create a derived
Cwnd object named MyWnd in the oncreate of view class of my application
. I was just tracing Onsize of each of CMainFrameApp ,CView App and
MyWnd of My app.
I found the order as :-

MyWnd |
CViewApp | This might be due to
creation of each window
CMainFrameApp |

CViewApp | This might be following
the change in CMainFrameApp
MyWnd |

CMainFrameApp | ??? ??? Why is this being
called???
CViewApp |
----------------------------------------------------

Thanks
Ajay Kalra
2006-08-24 13:28:32 UTC
Permalink
Post by Arpit
CMainFrameApp | ??? ??? Why is this being
called???
CViewApp |
What methods in these classes are getting called that you are not sure
about?

---
Ajay
Arpit
2006-08-30 05:13:55 UTC
Permalink
No my doubt is Why OnSize is being called in the order of OnSize Of
Class Given below
1) CWndDerived
2) CViewAp
3) CMainFrameApp

4)CViewApp
5) CWndDerived

6)CMainFrameApp
7)CViewApp
Post by Ajay Kalra
Post by Arpit
CMainFrameApp | ??? ??? Why is this being
called???
CViewApp |
What methods in these classes are getting called that you are not sure
about?
---
Ajay
Tom Serface
2006-08-24 14:36:59 UTC
Permalink
You are correct that the OnSize() routine will get called for each window
that is moving or changing size. It's up to you to make the decision what
to do with the event and information.

Tom
Post by Arpit
Hi experts.
I m a NewBee For MFC.I have made an sdi application. i create a derived
Cwnd object named MyWnd in the oncreate of view class of my application
. I was just tracing Onsize of each of CMainFrameApp ,CView App and
MyWnd of My app.
I found the order as :-
MyWnd |
CViewApp | This might be due to
creation of each window
CMainFrameApp |
CViewApp | This might be following
the change in CMainFrameApp
MyWnd |
CMainFrameApp | ??? ??? Why is this being
called???
CViewApp |
----------------------------------------------------
Thanks
Loading...