Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dynamic Window and overload functions

12 views
Skip to first unread message

Todor Atanasov

unread,
May 4, 2013, 5:07:15 PM5/4/13
to
Hi guys, it is me again.

I have some questions about creating dynamically windows in MFC and calling functions from it.

I create window with
CWnd chils;
child.CreateEx(...);
child.ShowWindow(SW_SHOW);

But then how to call/overload functions like: OnPaint, OnMouseMove and so on in that window?


T.

ScottMcP [MVP]

unread,
May 4, 2013, 10:04:41 PM5/4/13
to
You can't add code to CWnd. You can add code to a class you derive from CWnd. If you use the Visual Studio menu commands to add a class derived from CWnd then it will have some skeletal code and a message map. You can add message handlers by clicking on your class's Properties in the class view tab of solution explorer.

Todor Atanasov

unread,
May 5, 2013, 2:39:45 AM5/5/13
to
Of course how stupid of me:D Thanks a lot.



T.
0 new messages