Table of Content
HAL Forum
function integer WindowCompanyNr (
Integer wn)
Description:
Returns the company code for the specified window so that one could identify the source of the record that is viewed. Useful when creating cross-company solutions
Parameters:
wn Window Number
global
procedure NoteFromArchiveWsm()
BEGIN
  Integer wn,mwn,nwn,thewn;
  record RcVc RepSpec;
  record NotepadVc Noter;
  
  wn = CurWindow;
  GetWindowRecord(wn,RepSpec);
  if (blank(RepSpec.f1)) then begin goto LNoteFromArchiveWsm; end;
  RecordNew(Noter);
  Noter.FromRecidStr = RepSpec.f1;
  mwn = MotherWindow(wn);
  thewn = mwn;
  if (thewn==0) then begin thewn = wn; end;
  Noter.CompanyNr = WindowCompanyNr(thewn);
  nwn = OpenWindow("NotepadDClass",1,wn,"","",Noter);
LNoteFromArchiveWsm:;
  RETURN;
END;
Related topics:
««