This code (in the main Exe), IF the MsgBox is present, works as
expected. Without the MsgBox, it gives a GPF in User.Exe.
The main Exe module creates a dialog with
The first time this main Exe calls the DLL it sends the handle of this primary dialog to the
DLL which places it in a global variable "xDlg&", and then creates two further dialogs with the
style ---
The sub "ExitQuend" is in the DLL module and does nothing more alarming than cleaning up.
The handles of both dialogs created in the DLL are passed back to the main Exe as soon as
they have been created.
Point of all this: I don't NEED the MsgBox, but it seems that Windows does!
Anyone have any ideas?
'______________________________________________________________________
'______________________________________________________________________
------------------
expected. Without the MsgBox, it gives a GPF in User.Exe.
The main Exe module creates a dialog with
Code:
Local Style As Long Style = %WS_SYSMENU Or _ %WS_MINIMIZEBOX Or _ %DS_SETFOREGROUND Dialog New 0, "peAc MAIN MENU", 0, 0, 534, 372, Style, %WS_EX_CONTROLPARENT To pDlg&
DLL which places it in a global variable "xDlg&", and then creates two further dialogs with the
style ---
Code:
Style& = %DS_SETFONT Or _ %DS_3DLOOK Or _ %DS_NOFAILCREATE Or _ %WS_CHILD 'Or _ ' %DS_CONTROL Dialog New xDlg&, "Quotation cost summary", 0, 24, 423, 300, Style& To cDlg& Control Add Frame, cDlg&, %QEmbxFrm, "Quotation cost summary", 6, 1, 412, 297 Control Send cDlg&, %QEmbxFrm, %WM_SETFONT, qhFont&, 1 Style&= %DS_SETFONT Or _ %WS_BORDER Or _ %DS_NOFAILCREATE Or _ %DS_SETFOREGROUND Or _ %WS_VSCROLL Or _ %WS_CHILD 'Or _ ' %DS_CONTROL Dialog New xDlg&, "", 13, 64, 396, 250, Style& To sDlg&
The handles of both dialogs created in the DLL are passed back to the main Exe as soon as
they have been created.
Point of all this: I don't NEED the MsgBox, but it seems that Windows does!
Anyone have any ideas?
'______________________________________________________________________
Code:
Sub ExitSubSystem 'in main Exe module If ActiveSystem$="Creditors/purchases/stock" Then Call ExitCreditors Else If ScrnName$="Main finishing machines" Or _ ScrnName$="Sundry finishing machines" Or _ ScrnName$="Manual finishing" Then Call ExitFinishing If ScrnName$="TypeSetting" Or _ ScrnName$="Reproduction" Or _ ScrnName$="PaperCostCalc" Or _ ScrnName$="InkCostCalc" Or _ ScrnName$="PmcCostCalc" Then Call ExitTpsRpr If ScrnName$="Outwork" Then Dialog End DLLdlg& If ScrnName$="QuLetter" Or _ ScrnName$="WkTicket" Then Call ExitLetWt If ScrnName$="Despatch" Or _ ScrnName$="Qcosting" Or _ ScrnName$="Worktickets menu" Or _ ScrnName$="Time dockets capturing" Then Call ExitQuend If ScrnName$="Qcosting" Then MsgBox(Str$(DLLdlg&)+Str$(DlxDlg&)) Dialog End DLLdlg& 'This and/or Dialog End DlxDlg& 'this gives the GPF End If End If If ScrnName$="Job cost analysis" Or _ ScrnName$="Estimated/actual job costs" Or _ ScrnName$="Job cost adjustments" Then Call ExitPrint If SysInit&=1 Then If ScrnName$="Printing department" Then Dialog End pmDlg&, 1 Dialog End hDlg& End If End If If StjSetup&=1 Then Call ExitStdSetupBasics Call RemoveMainMenu If ActiveSystem$="ProdMenu" Then If ScrnName$="Account status for new quotes" Or _ ScrnName$="Bleed defaults for bookwork" Or _ ScrnName$="Bleed defaults for jobbing" Or _ ScrnName$="Categories of outwork" Or _ ScrnName$="Cost sub-allocations" Or _ ScrnName$="Markup: labour" Or _ ScrnName$="Markup: material" Or _ ScrnName$="Markup: outwork" Or _ ScrnName$="Markup: paper" Or _ ScrnName$="Paper suppliers' setups" Or _ ScrnName$="Paper trim defaults" Or _ ScrnName$="Workticket options" Then Call ExitMiscCust End If If StjSetup&=1 Then Call ExitStdSetupBasics End Sub '______________________________________________________________________ Sub ExitQuend Alias "ExitQuend" Export 'in DLL module Call DestroyBrushes If fcn$="QuLetter" Or fcn$="WkTicket" Then Dialog End sDlg&, 1 If fcn$="WkTicket" Or fcn$="Worktickets menu" Then WtMenuSort$="" If fcn$<>"Qcosting" Then Dialog End hDlg&, 1 fcn$="" End Sub
------------------
Comment