Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

i have report generation process going in one tab for few minutes but what is happening if user clicks on some other tab or return button as process is going on it is crashing in mfc.

how to stop user no to do actions up to the process completion or any other better approach is there ?

the problem is i have do events function :



if i changed the tab some how the database pointer other is getting garabage and it is crashing.

What I have tried:

MSG msg;

while ( PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) )
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
Posted
Updated 4-Jun-19 21:19pm
Comments
Member 13798855 5-Jun-19 7:04am    
i have solved by my self with passing the hwnd thanks

1 solution

Add some code to the Tab Control Notifications - Windows applications | Microsoft Docs[^] handler to ignore changes while your report process is active.
 
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