Click here to Skip to main content
15,903,203 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey all,
I am trying to develop a mfc vc++ project which has a check list box full of ip-port numbers in the dialog and the user will check the ip-port couple to connect to that port. As there is multi selection, I couldnt find out how to make the multi thread operations in one dialog. If you have any idea, please share with me.
Regards,
Gilraen
Posted

1 solution

The dialog would not be accessed directly by one of the threads because there is a single UIThread that handles the messages. The selection should be stored in another data structure with locking added for thread-safety but the thread should never access the UI themselves directly because this would lead to the most wild exceptions you can imagine. You could create a sort of controller class that manages this.

Have a look at these links:

http://weblogs.asp.net/rosherove/archive/2005/05/23/408511.aspx[^]

http://weblogs.asp.net/justin_rogers/pages/126345.aspx[^]
 
Share this answer
 

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