Close_Client()
as of 15.0, these were moved to AppDialog super class
//
// Save View information to dfwin.ini file. Save as:
// View_ObjectName=LOC:Row,Col e.g., Cust_Ent=LOC:10,20
// Leaving room for growth here.
//
{ Visibility=Private }
Procedure Save_Environment
String sWindowPlacement
Address aWindowPlacement
Boolean bSuccess
Integer eShowCmd
// save environment to the object, in case it is reactivated during the same run.
ZeroType tWindowPlacement To sWindowPlacement
Put tWindowPlacement_size To sWindowPlacement at tWindowPlacement.length
Move (AddressOf(sWindowPlacement)) To aWindowPlacement
Move (GetWindowPlacement(Window_Handle(self), aWindowPlacement)) To bSuccess
If bSuccess Begin
// if minimized, assume restored, as we don't want to restart minimized!
GetBuff from sWindowPlacement at tWindowPlacement.showCmd To eShowCmd
If (eShowCmd = SW_SHOWMINIMIZED) Begin
Put SW_SHOWNORMAL To sWindowPlacement at tWindowPlacement.showCmd
End
Set psWindowPlacement to sWindowPlacement
End
// also save environment to the application object, so it can be used when reloaded
If ghoApplication Send DoSaveEnvironment of ghoApplication self False
End_Procedure
// Augment to check for view string in .INI. Currently, if found
// set the location
//
{ Visibility=Private }
Procedure Load_Environment
String sWindowPlacement
boolean bSuccess
// if view has alrady been activated and deactivated use the setting from windowplacement saved in the object
get psWindowPlacement to sWindowPlacement // Make sure we GET here and not Move. This thing can contain zeros which will get lost in expr.
If (length(sWindowPlacement)) begin // if length is zer0, assume it has never been deactivated.
Move (SetWindowPlacement(Window_Handle(self), addressof(sWindowPlacement))) To bSuccess
End
else Begin
If ghoApplication Send DoLoadEnvironment of ghoApplication self False
end
End_Procedure
{ MethodType=Event NoDoc=True }
Procedure Notify_Exit_Application
Send Save_Environment
End_procedure
{ NoDoc=True }
Procedure Add_Focus Integer hoBase Returns Integer
Integer iretVal bState
get Visible_state to bState
Set Visible_state to False
Forward Get Msg_Add_Focus hoBase To iretVal
If (iRetVal=0) Send Load_Environment
Set Visible_state to bState
Procedure_Return iRetVal
End_Procedure