日期:2012-09-09  浏览次数:20497 次

//////////////////////////////////////////////////////////////////////////////////////////////////
//  function: CMClientDlg::OnDeleteitemListparam()
//
//  parameters: (NMHDR* pNMHDR, LRESULT* pResult)
//
//  description: for each row of list, it calls the Release
//
//  returns: void
//
//////////////////////////////////////////////////////////////////////////////////////////////////
void CMClientDlg::OnDeleteitemListparam(NMHDR* pNMHDR, LRESULT* pResult)
{
// We have to release lParam that I filled with object of ISoapMapper
    NMLISTVIEW   *tempVar = (NMLISTVIEW*)pNMHDR;;

    if (reinterpret_cast <IUnknown*>(tempVar->lParam))
        (reinterpret_cast <IUnknown*>(tempVar->lParam))->Release();
    
    *pResult = 0;
}

//////////////////////////////////////////////////////////////////////////////////////////////////
//  function: CMClientDlg::OnDeleteitemTree()
//
//  parameters: (NMHDR* pNMHDR, LRESULT* pResult)
//
//  description: for each tree elements, it calls the Release method
//  returns: void
//
//////////////////////////////////////////////////////////////////////////////////////////////////
void CMClientDlg::OnDeleteitemTree(NMHDR* pNMHDR, LRESULT* pResult)
{
    // We have to release lParam that I filled with object
    NMTREEVIEW   *tempVar = (NMTREEVIEW*)pNMHDR;;
    if (reinterpret_cast <IUnknown*>(tempVar->itemOld.lParam))
        (reinterpret_cast <IUnknown*>(tempVar->itemOld.lParam))->Release();

    *pResult = 0;
}

//////////////////////////////////////////////////////////////////////////////////////////////////
//  function: CMClientDlg::OnSelchangedTree()
//
//  parameters: (NMHDR* pNMHDR, LRESULT* pResult)
//
//  description: for selection on tree, it updates the list
//
//  returns: void
//
//////////////////////////////////////////////////////////////////////////////////////////////////
void CMClientDlg::OnSelchangedTree(NMHDR* pNMHDR, LRESULT* pResult)
{
    // if the selected is operation, update the list with its parameters
    NMTREEVIEW* pNMTreeView = (NMTREEVIEW*)pNMHDR;


    IUnknown *pUnk = reinterpret_cast<IUnknown *>(pNMTreeView->itemNew.lParam);

    if (! pUnk)
        return;

    IWSDLOperation *pOper = 0;

    m_strParameter.Empty();
    UpdateData(false);

    if(SUCCEEDED(pUnk->QueryInterface(__uuidof(IWSDLOperation), reinterpret_cast<void **>(&pOper))))
    {
        if (UpdateList() != 1)
            MSG("Parameter list can not be created!");
    }

    *pResult = 0;

cleanup:
    if (pOper)
        pOper->Release();
    
    return;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//  function: CMClientDlg::OnLoad()
//
//  parameters: No Parameters