Table of Content
HAL Forum
function string WindowFormName (
integer WindowID)
Description:
Returns the name of the function that the targeted window uses when printing event is called (e.g. user pushes the "print" button)
Parameters:
WindowID Target window identificator
global 
updating procedure CreateMailFromIVDsm()
begin
  Integer wn,nwn;
  record MailVc Mailr;
  record IVVc IVr;
  Integer err;
  string 255 tstr,docname;
  record MailSettingsBlock MSb;
  Boolean testf;

  wn = CurWindow;
  if (WindowState(wn)==0) then begin//normalstate
    testf = true;
    GetWindowRecord(wn,IVr); 
    err = TestAcceptanceStatus(IVr.AcceptanceStatus);
    if (err!=0) then begin
      MessageBox(err,": " & IVr.SerNr);
      testf = false;
    end;
    if (testf) then begin
      BlockLoad(MSb);
      if (MSb.UseExternalMail) then begin
        err = CreateExternalMailFromIVD(IVr,tstr,true,WindowFormName(wn));      
      end else begin
        err = CreateMailFromIVD(IVr,Mailr,tstr,true,WindowFormName(wn));
        if (err!=0) then begin
          MessageBox(err,": " & tstr);
        end else begin
          nwn = OpenWindow("MailDClass",1,0,"","",Mailr);
        end;
      end;
    end;
  end;
  return;
end;

Related topics:
««