*/
void updateUI(HWND hWnd){  CPlugin * pPlugin = (CPlugin *)GetWindowLong(hWnd, DWL_USER);  assert(pPlugin != NULL);  DWORD dwNPInstance = (DWORD)pPlugin->getNPInstance();  char szNPInstance[16];  wsprintf(szNPInstance, "%#08lx", dwNPInstance);  Static_SetText(GetDlgItem(hWnd, IDC_STATIC_INFO), "");  ShowWindow(GetDlgItem(hWnd, IDC_STATIC_INFO), SW_HIDE);  setStaticTexts7(hWnd, "","","","","","","");  setEditTexts7(hWnd, "","","","","","","");  enableEdits7(hWnd, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);  EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_GO), TRUE);  char szString[80];  int iIndex = ComboBox_GetCurSel(GetDlgItem(hWnd, IDC_COMBO_API_CALL));  ComboBox_GetLBText(GetDlgItem(hWnd, IDC_COMBO_API_CALL), iIndex, szString);  ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_SHOW);  ComboBox_ResetContent(GetDlgItem(hWnd, IDC_COMBO_ARG1));  ComboBox_ResetContent(GetDlgItem(hWnd, IDC_COMBO_ARG2));  ComboBox_ResetContent(GetDlgItem(hWnd, IDC_COMBO_ARG3));  ComboBox_ResetContent(GetDlgItem(hWnd, IDC_COMBO_ARG6));  ShowWindow(GetDlgItem(hWnd, IDC_COMBO_ARG1), SW_HIDE);  ShowWindow(GetDlgItem(hWnd, IDC_COMBO_ARG2), SW_HIDE);  ShowWindow(GetDlgItem(hWnd, IDC_COMBO_ARG3), SW_HIDE);  ShowWindow(GetDlgItem(hWnd, IDC_COMBO_ARG6), SW_HIDE);  if(strcmp(szString, STRING_NPN_VERSION) == 0)  {    showArgControls7(hWnd, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_GETURL) == 0)  {    showArgControls7(hWnd, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "URL:", "target (or 'NULL'):", "", "", "", "");    setEditTexts7(hWnd, szNPInstance,NS_SAMPLE_URL,"_npapi_Display","","","","");  }  else if(strcmp(szString, STRING_NPN_GETURLNOTIFY) == 0)  {    showArgControls7(hWnd, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "URL:", "target (or 'NULL'):", "notifyData:", "", "", "");    setEditTexts7(hWnd, szNPInstance,NS_SAMPLE_URL,"_npapi_Display","0","","","");  }  else if(strcmp(szString, STRING_NPN_POSTURL) == 0)  {    showArgControls7(hWnd, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE);    enableEdits7(hWnd, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE);    setStaticTexts7(hWnd, "instance:", "URL:", "target (or 'NULL'):", "len:", "buf:", "file:", "");    setEditTexts7(hWnd, szNPInstance,NS_SAMPLE_URL,"_npapi_Display","0","","","");    replaceEditWithCombo(hWnd, FALSE, FALSE, FALSE, TRUE);    HWND hWndCombo = GetDlgItem(hWnd, IDC_COMBO_ARG6);    ComboBox_AddString(hWndCombo, "FALSE");    ComboBox_AddString(hWndCombo, "TRUE");    ComboBox_SetCurSel(hWndCombo, 0);  }  else if(strcmp(szString, STRING_NPN_POSTURLNOTIFY) == 0)  {    showArgControls7(hWnd, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);    enableEdits7(hWnd, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);    setStaticTexts7(hWnd, "instance:", "URL:", "target (or 'NULL'):", "len:", "buf:", "file:", "notifyData:");    setEditTexts7(hWnd, szNPInstance,NS_SAMPLE_URL,"_npapi_Display","0","","","0");    replaceEditWithCombo(hWnd, FALSE, FALSE, FALSE, TRUE);    HWND hWndCombo = GetDlgItem(hWnd, IDC_COMBO_ARG6);    ComboBox_AddString(hWndCombo, "FALSE");    ComboBox_AddString(hWndCombo, "TRUE");    ComboBox_SetCurSel(hWndCombo, 0);  }  else if(strcmp(szString, STRING_NPN_NEWSTREAM) == 0)  {    showArgControls7(hWnd, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "type:", "target:", "**stream:", "", "", "");    char szStream[16];    const NPStream * pStream = pPlugin->getNPStream();    wsprintf(szStream, "%#08lx", &pStream);    setEditTexts7(hWnd, szNPInstance,"text/plain","_npapi_Display",szStream,"","","");    EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_GO), (pStream != NULL) ? FALSE : TRUE);  }  else if(strcmp(szString, STRING_NPN_REQUESTREAD) == 0)  {    EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_GO), FALSE);    ShowWindow(GetDlgItem(hWnd, IDC_STATIC_INFO), SW_SHOW);    Static_SetText(GetDlgItem(hWnd, IDC_STATIC_INFO), szNotImplemented);    showArgControls7(hWnd, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_DESTROYSTREAM) == 0)  {    showArgControls7(hWnd, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "stream:", "reason:", "", "", "", "");    char szStream[16];    const NPStream * pStream = pPlugin->getNPStream();    wsprintf(szStream, "%#08lx", pStream);    setEditTexts7(hWnd, szNPInstance,szStream,"","","","","");    replaceEditWithCombo(hWnd, FALSE, FALSE, TRUE, FALSE);    HWND hWndCombo = GetDlgItem(hWnd, IDC_COMBO_ARG3);    ComboBox_AddString(hWndCombo, "NPRES_DONE");    ComboBox_AddString(hWndCombo, "NPRES_USER_BREAK");    ComboBox_AddString(hWndCombo, "NPRES_NETWORK_ERR");    ComboBox_SetCurSel(hWndCombo, 0);    EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_GO), (pStream == NULL) ? FALSE : TRUE);  }  else if(strcmp(szString, STRING_NPN_WRITE) == 0)  {    showArgControls7(hWnd, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "stream:", "len:", "buf:", "", "", "");    char szStream[16];    const NPStream * pStream = pPlugin->getNPStream();    wsprintf(szStream, "%#08lx", pStream);    setEditTexts7(hWnd, szNPInstance,szStream,"0","","","","");    EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_GO), (pStream == NULL) ? FALSE : TRUE);  }  else if(strcmp(szString, STRING_NPN_STATUS) == 0)  {    showArgControls7(hWnd, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "message:", "", "", "", "", "");    setEditTexts7(hWnd, szNPInstance,"Some message","","","","","");  }  else if(strcmp(szString, STRING_NPN_USERAGENT) == 0)  {    showArgControls7(hWnd, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "", "", "", "", "", "");    setEditTexts7(hWnd, szNPInstance,"","","","","","");    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_MEMALLOC) == 0)  {    showArgControls7(hWnd, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "size:", "", "", "", "", "", "");    setEditTexts7(hWnd, "256","","","","","","");    EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_GO), (pPlugin->m_pNPNAlloced == NULL) ? TRUE : FALSE);    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_MEMFREE) == 0)  {    showArgControls7(hWnd, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "ptr:", "", "", "", "", "", "");    char szPtr[16];    wsprintf(szPtr, "%#08lx", pPlugin->m_pNPNAlloced);    setEditTexts7(hWnd, szPtr,"","","","","","");    EnableWindow(GetDlgItem(hWnd, IDC_BUTTON_GO), (pPlugin->m_pNPNAlloced == NULL) ? FALSE : TRUE);    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_MEMFLUSH) == 0)  {    showArgControls7(hWnd, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "size:", "", "", "", "", "", "");    setEditTexts7(hWnd, "256","","","","","","");    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_RELOADPLUGINS) == 0)  {    showArgControls7(hWnd, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "reloadPages:", "", "", "", "", "", "");    setEditTexts7(hWnd, "","","","","","","");    replaceEditWithCombo(hWnd, TRUE, FALSE, FALSE, FALSE);    HWND hWndCombo = GetDlgItem(hWnd, IDC_COMBO_ARG1);    ComboBox_AddString(hWndCombo, "TRUE");    ComboBox_AddString(hWndCombo, "FALSE");    ComboBox_SetCurSel(hWndCombo, 0);    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_GETJAVAENV) == 0)  {    showArgControls7(hWnd, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_GETJAVAPEER) == 0)  {    showArgControls7(hWnd, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "", "", "", "", "", "");    setEditTexts7(hWnd, szNPInstance,"","","","","","");    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_GETVALUE) == 0)  {    showArgControls7(hWnd, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "variable:", "", "", "", "", "");    setEditTexts7(hWnd, szNPInstance,"","","","","","");    replaceEditWithCombo(hWnd, FALSE, TRUE, FALSE, FALSE);    HWND hWndCombo = GetDlgItem(hWnd, IDC_COMBO_ARG2);    ComboBox_AddString(hWndCombo, "NPNVxDisplay");    ComboBox_AddString(hWndCombo, "NPNVxtAppContext");    ComboBox_AddString(hWndCombo, "NPNVnetscapeWindow");    ComboBox_AddString(hWndCombo, "NPNVjavascriptEnabledBool");    ComboBox_AddString(hWndCombo, "NPNVasdEnabledBool");    ComboBox_AddString(hWndCombo, "NPNVisOfflineBool");    ComboBox_SetCurSel(hWndCombo, 0);    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_SETVALUE) == 0)  {    showArgControls7(hWnd, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "variable:", "*value:", "", "", "", "");    setEditTexts7(hWnd, szNPInstance,"","","","","","");    replaceEditWithCombo(hWnd, FALSE, TRUE, FALSE, FALSE);    HWND hWndCombo = GetDlgItem(hWnd, IDC_COMBO_ARG2);    ComboBox_AddString(hWndCombo, "NPPVpluginNameString");    ComboBox_AddString(hWndCombo, "NPPVpluginDescriptionString");    ComboBox_AddString(hWndCombo, "NPPVpluginWindowBool");    ComboBox_AddString(hWndCombo, "NPPVpluginTransparentBool");    ComboBox_AddString(hWndCombo, "NPPVpluginWindowSize");    ComboBox_SetCurSel(hWndCombo, 0);    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_INVALIDATERECT) == 0)  {    showArgControls7(hWnd, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "top:", "left:", "bottom:", "right:", "", "");    setEditTexts7(hWnd, szNPInstance,"0","0","0","0","","");    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_INVALIDATEREGION) == 0)  {    showArgControls7(hWnd, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "region:", "", "", "", "", "");    setEditTexts7(hWnd, szNPInstance,"0","0","0","0","","");    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else if(strcmp(szString, STRING_NPN_FORCEREDRAW) == 0)  {    showArgControls7(hWnd, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    enableEdits7(hWnd, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);    setStaticTexts7(hWnd, "instance:", "", "", "", "", "", "");    setEditTexts7(hWnd, szNPInstance,"","","","","","");    ShowWindow(GetDlgItem(hWnd, IDC_BUTTON_PASTE), SW_HIDE);  }  else    assert(0);}