[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.8

Application crashing in between, MFC, VC++

Asked by rbhargaw in Microsoft Programming, Windows MFC Programming, .NET

Tags: MFC, VC++

I have a Dialog box under the VC++ Client/Server (unmanaged code) application which contain two list box..One set of listbox1 data is filled from database and one set set of listbox2 from webservice...Both of them are called when I click on Search button after giving the necessary inputs in the dialog box ..The  functions used to populate from database are below
-------------------------------
PrepareForSearch();      
      DoSearch();
"DisplayResult();
-----------------------------------------
after that I am calling Web service call via create thread...

The issue is if I select the data in the listbox( which is already filled by database) without waiting for 5 seconds for the Web serivce call to finish..the code just hangs..

The webservice data normally comes back in 3-4 seconds so if on that period someone clicks on listbox1..the program crashes..

what would be ideal solution in the scenario?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
void CDlgFinCoverageSearch::OnButSearch()
{
	
	
	CWaitCursor wc;
 
	PrepareForSearch();	
	DoSearch();
	DWORD dwTID;
	DisplayResult();
	m_nTimer = SetTimer(1,5000,NULL);
	
	m_hThread = CreateThread(NULL,0,WebServiceCallThread, (LPVOID) this,0,&dwTID);
	if(m_hThread == NULL)
	{
		DWORD dwError = GetLastError();
		AfxMessageBox( dwError);
		return;
	}
	//CloseHandle(hThread);
	//DisplayResult();
 
	GotoDlgCtrl(&m_lcList);
	m_bChange = FALSE;
 
	if(m_lcList.GetItemCount()) // something there
		MakeDefaultButton(OK);
}
 
------------------------------------------------------------------------------------------------------------------------
 
DWORD WINAPI CDlgFinCoverageSearch::WebServiceCallThread(LPVOID pv) 
{
	CDlgFinCoverageSearch* pWnd = (CDlgFinCoverageSearch*) pv;
	pWnd->VFSWEbServiceCall();
	pWnd->PostMessage(WM_WEBSERVICEDONE,0,0);
	return 1;
}
[+][-]10/14/09 08:32 AM, ID: 25571724Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/14/09 10:49 AM, ID: 25573106Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/14/09 10:56 PM, ID: 25577640Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Microsoft Programming, Windows MFC Programming, .NET
Tags: MFC, VC++
Sign Up Now!
Solution Provided By: DanRollins
Participating Experts: 3
Solution Grade: A
 
[+][-]10/14/09 11:20 PM, ID: 25577742Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/15/09 12:14 AM, ID: 25578003Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/15/09 07:35 AM, ID: 25580931Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/15/09 07:45 AM, ID: 25581075Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/15/09 08:32 AM, ID: 25581615Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/15/09 08:56 AM, ID: 25581883Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/15/09 09:48 AM, ID: 25582388Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/15/09 09:59 AM, ID: 25582461Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/15/09 03:43 PM, ID: 25585625Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/17/09 06:26 AM, ID: 25595875Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/26/09 08:14 PM, ID: 25668883Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/26/09 11:20 PM, ID: 25669486Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/27/09 12:14 AM, ID: 25669722Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625