Click here to Skip to main content
15,907,874 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi all, i've a dialog based application.where in i've 3 dialogs.i want to clear all the controls which are displying on all dialogs by changing the combobox items.that means, the controls on dialog should be based on combobox value.i've tried with events, but in that, it is showing the new controls along with the previous controls.i want to hide all previous controls and want to show the new controls.how can i move with this?please help me..
thank you in advance.
Posted
Updated 7-Jul-11 0:25am
v2

You should choose a method to send data between dialogs.

You can put some public functions in each dialog that should receive information in order to call them from the original one and then react in the destiny dialogs.

You can also send messages to the different dialogs with a structure with data...

In order to show or hide controls you can use the function ShowWindow with SW_HIDE or SW_SHOW;
 
Share this answer
 
Comments
Jijesh Balakrishnan 7-Jul-11 6:35am    
k..thank you.let me try this..
Joan M 7-Jul-11 6:37am    
Let me know if you have succeed... and don't doubt to come back with problems if you encounter them... ;)
Jijesh Balakrishnan 7-Jul-11 6:49am    
ya sure..
Jijesh Balakrishnan 7-Jul-11 7:46am    
its worked.thank you.
Joan M 7-Jul-11 7:50am    
Perfect... You should mark the question as solved... Clicking on "accept solution". Come as many times you could need...
Joan's answer is correct... but I would add that the MFC proper way of doing this is through SendMessage() or PostMessage() and an event handler in the receiving dialog (the event handler would manage the internal controls).
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900