Table of Content
HAL Forum
function string GetWindowNameArg (
integer WinId)
Description:
Sets the value of a string variable that is related to a specified window. Used for multiple purposes (eg. note the example below).
Parameters:
WinId The number of the window
global
function Boolean TestForMATVARINS(Integer wn)
BEGIN
  Boolean res;
  string 255 itemcode,itemsize,mask,subsets,location;  
  string 60 wclass;
  record INVc INr;
  record VarietyBlock VBr;

  itemcode = FirstInRange(GetWindowNameArg(wn),20);
  location = LastInRange(GetWindowNameArg(wn),20);
  wclass = GetWindowClass(wn);
  if ((blank(itemcode)) or 
      (wclass=="VARMaskTClass") or 
      (wclass=="AvailVarsRClass")) then begin goto LTestForMATVARINS; end;//list of all windows where paste variety should not work, C - code!
  BlockLoad(VBr);
  if (VBr.OpenVarPaste==0) then begin goto LTestForMATVARINS; end;
  if (FindItemVAR2(itemcode,itemsize,mask,subsets)==false) then begin goto LTestForMATVARINS; end;
  if (ReadFirstItem(itemcode,INr,true,true)) then begin goto LTestForMATVARINS; end;
  res = PrepareAndOpenMatVARWind(wn,itemcode,location,itemsize,mask,subsets);
LTestForMATVARINS:;  
  TestForMATVARINS = res;
  RETURN;
END;

Related topics:
««