anchor.diff:      destructor Destroy; override;
     end;
   
  +    // һ򵥵Ĳ˵ɿduiliblistDemoһ˵
  +  TDuiPopupMenu = class(TDuiWindowImplBase)
  +  private
  +    FListUI: CListUI;
  +  protected
  +    procedure DoNotify(var Msg: TNotifyUI); override;
  +    procedure DoHandleMessage(var Msg: TMessage); override;
  +    procedure DoFinalMessage(hWd: HWND); override;
  +    procedure DoInitWindow; override;
  +  public
  +    constructor Create(AListUI: CListUI);
  +  end;
  +
  +
   { TListMainForm }
   
   constructor TListMainForm.Create;
  
positive.code: procedure TListMainForm.DoNotify(var Msg: TNotifyUI);
  var
    LType, LCtlName: string;
  begin
    inherited;
    LType := Msg.sType;
  
negative.code:       Minimize
      else if LCtlName.Equals('btn') then
        OnSearch;
    end else if LType.Equals(DUI_EVENT_ITEMACTIVATE) then
    begin
      iIndex := Msg.pSender.Tag;
      if (iIndex <> -1) and (iIndex < FList.Count) then
      begin
        MessageBox(0, PChar(Format('Col1=%s, Col2=%s, Col3=%s',
          [FList[iIndex].Col1, FList[iIndex].Col2, FList[iIndex].Col3])), nil, MB_OK);
      end;
    end else if LType.Equals(DUI_EVENT_MENU) then
    begin
      if LCtlName.Equals('domainlist') then
      begin
        TDuiPopupMenu.Create(CListUI(msg.pSender));
      end;
    end else if LType.Equals('menu_Delete') then
    begin
      pList := CListUI(Msg.pSender);
      if pList <> nil then
      begin
         iIndex := pList.GetCurSel;
         if (iIndex <> -1) and (iIndex < FList.Count) then
           pList.RemoveAt(iIndex);
      end;
    end;
  end;
  
  