webservice系列教學(16)-如何調用webservice(vc7)

來源:互聯網
上載者:User
web //////////////////////////////////////////////////////////////////////////////////////////////////
//  function: CMClientDlg::assignItem()
//
//  parameters: (LVITEM *item, UINT mask, int iItem, int iSubItem, LPTSTR pszText, int cchTextMax)
//
//  description: assigns the given values  for a LVITEM type item
//
//  returns: void
//
//////////////////////////////////////////////////////////////////////////////////////////////////
void CMClientDlg::assignItem(LVITEM *item, UINT mask, int iItem, int iSubItem, LPTSTR pszText, int cchTextMax)
{
    item->mask            = mask;
    item->iItem            = iItem;
    item->iSubItem        = iSubItem;
    item->pszText        = pszText;
    item->cchTextMax    = cchTextMax;
    return;
}
//////////////////////////////////////////////////////////////////////////////////////////////////
//  function: CMClientDlg::AssignpRef()
//
//  parameters: (VARIANT *var1, VARIANT *var2)
//
//  description: assigns the value of var1 ,from var2 variant type
//
//  returns: void
//
//////////////////////////////////////////////////////////////////////////////////////////////////
void CMClientDlg::AssignpRef(VARIANT *var1, VARIANT *var2)
{
    switch (var2->vt)
    {
    case VT_BOOL:
        V_BOOLREF(var1)     = &var2->boolVal;
        break;
    case VT_BSTR:
        V_BSTRREF(var1)     = &var2->bstrVal;
        break;
    case VT_DATE:
        V_DATEREF(var1)     = &var2->date;
        break;
    case VT_DECIMAL:
        V_DECIMALREF(var1)  = &var2->decVal;
        break;
    case VT_I1:
        V_I1REF(var1)       = &var2->cVal;
        break;
    case VT_I2:
        V_I2REF(var1)       = &var2->iVal;
        break;
    case VT_I4:
        V_I4REF(var1)       = &var2->lVal;
        break;
    case VT_R4:
        V_R4REF(var1)       = &var2->fltVal;
        break;
    case VT_R8:
        V_R8REF(var1)       = &var2->dblVal;
        break;
    case VT_UI1:
        V_UI1REF(var1)      = &var2->bVal;
        break;
    case VT_UI2:
        V_UI2REF(var1)      = &var2->uiVal;
        break;
    case VT_UI4:
        V_UI4REF(var1)      = &var2->ulVal;
        break;
    case VT_INT:
        V_INTREF(var1)      = &var2->intVal;
        break;
    case VT_CY:
        V_CYREF(var1)       = &var2->cyVal;
        break;
    default :
        V_R8REF(var1)       = &var2->dblVal;
    };
    return;
}
void CMClientDlg::DisableButtons()
{
    GetDlgItem(IDC_EXECUTE)->EnableWindow(FALSE);
    GetDlgItem(IDC_CLOSE)->EnableWindow(FALSE);
    GetDlgItem(IDC_EDIT)->EnableWindow(FALSE);
    GetDlgItem(IDBROWSE)->EnableWindow(FALSE);
    GetDlgItem(IDLOAD)->EnableWindow(FALSE);
}
void CMClientDlg::EnableButtons()
{
     GetDlgItem(IDC_EXECUTE)->EnableWindow(TRUE);
     GetDlgItem(IDC_CLOSE)->EnableWindow(TRUE);
     GetDlgItem(IDC_EDIT)->EnableWindow(TRUE);
     GetDlgItem(IDBROWSE)->EnableWindow(TRUE);
     GetDlgItem(IDLOAD)->EnableWindow(TRUE);
}


相關文章

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。