Hi,
I had two occasions where I got this phenomena.
I wanted to use the CompilerManager.exe, as problems occurred I tried to revise and recompile the compiler manager from the section OpenSrc (up to that point I only modified 3 EXIT statements, see attached CM.BAS).
If I select a bas file to compile and press the GO button unfortunately nothing happens (that why I look for the problem). Maybe something crashed within the process (?). Then I try to terminate the application by pressing the CLOSE cross (right top) and the window disappears but the process stays behind in the task manager. I noticed this because I couldn't link anymore...
The concerned section in CompilerManager.bas (or revised CM.bas) is:
CASE WM_CLOSE
DeleteObject(BCXFONT)
END SELECT
It is translated to:
// [cm.bas - 280] CASE WM_CLOSE
goto L1000;
}
if(Msg==WM_CLOSE )
{
// [cm.bas - 281] DeleteObject(BCXFONT)
DeleteObject(BcxFont);
// [cm.bas - 282] END SELECT
}
L1000:;
// [cm.bas - 283] END DIALOG
if(Msg==WM_CLOSE) EndDialog(hWnd,0);
return 0;
}
As I want a real termination of the process I add a END statement:
CASE WM_CLOSE
DeleteObject(BCXFONT)
END
END SELECT
This is translated to:
// [cm.bas - 280] CASE WM_CLOSE
goto L1000;
}
if(Msg==WM_CLOSE )
{
// [cm.bas - 281] DeleteObject(BCXFONT)
DeleteObject(BcxFont);
// [cm.bas - 282] END
ExitProcess(0 );
// [cm.bas - 283] END SELECT
}
L1000:;
// [cm.bas - 284] END DIALOG
if(Msg==WM_CLOSE) EndDialog(hWnd,0);
return 0;
}
With this trick the termination was successful (even something went wrong within the application).
The same issue occurred with a small DLL testing application I build. In this application the GUI application calls a DLL that uses its own dialogue. If i.e. the dialogue of the GUI application was closed while it was running (shortly after pressing the button "Show progress bar") the GUI window was hidden but not terminated (see GUI_Problem.zip) and the DLL dialogue remained.
Maybe the problem is related here to the fact that I use DOEVENTS() to be able to stop the GUI process again with the same button.
With the END statement the GUI application + plus the DLL were terminated as expected.
Maybe the effect is only there if more or less asynchronous program parts are used.
I run BCX 7.45 and PellesC on Win 7 Pro SP1 (64 bit).