MDI in CLR Windows Form Application
-
Hello! I built my first simple CLR program. On "OK" button clic it displays MessageBox. Can anybody tell me how to do so that I activate Child dialog-based window by clicking "OK" on a Main dialog-based form. I want the Child form to be Properities window so it has to send some "settings" to the Main window. What code should I put to my program to call a dialog-based window in another. PS. If You be so nice and tell me also how to do this in MFC apps. SzyKam
-
Hello! I built my first simple CLR program. On "OK" button clic it displays MessageBox. Can anybody tell me how to do so that I activate Child dialog-based window by clicking "OK" on a Main dialog-based form. I want the Child form to be Properities window so it has to send some "settings" to the Main window. What code should I put to my program to call a dialog-based window in another. PS. If You be so nice and tell me also how to do this in MFC apps. SzyKam
First, from you described, this can be done with or without using MDI. Windows (parent/child) relationship is all you need to handle. I assume you know what MDI and MFC are. Communications between windows can be done in a number of ways. For your first attempt, assign the main window to be the parent of your Property window. Before closing Property window, call its parent and pass all the data to the main window. On the main window, add code to handle Get/Set property so that the child window can call. Hope this is helpful.
Best, Jun
-
First, from you described, this can be done with or without using MDI. Windows (parent/child) relationship is all you need to handle. I assume you know what MDI and MFC are. Communications between windows can be done in a number of ways. For your first attempt, assign the main window to be the parent of your Property window. Before closing Property window, call its parent and pass all the data to the main window. On the main window, add code to handle Get/Set property so that the child window can call. Hope this is helpful.
Best, Jun