Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.8 KiB

  1. //Copyright (c) 1998 - 2001 Microsoft Corporation
  2. #include "mode.h"
  3. void SetConnectionMethodText(HWND hDialog)
  4. {
  5. DWORD dwRetCode = ERROR_SUCCESS;
  6. TCHAR lpBuffer[512];
  7. //Now base the dynamic text on the combo box selection
  8. dwRetCode = ComboBox_GetCurSel(GetDlgItem(hDialog, IDC_MODEOFREG));
  9. if(dwRetCode == 0)
  10. {
  11. memset(lpBuffer,0,sizeof(lpBuffer));
  12. LoadString(GetInstanceHandle(),IDS_INTERNET_CONNECTION_DESC,lpBuffer,sizeof(lpBuffer)/sizeof(TCHAR));
  13. if (lpBuffer)
  14. SetDlgItemText(hDialog,IDC_CONNECTION_DESC,lpBuffer);
  15. memset(lpBuffer,0,sizeof(lpBuffer));
  16. LoadString(GetInstanceHandle(),IDS_INTERNET_CONNECTION_REQ,lpBuffer,sizeof(lpBuffer)/sizeof(TCHAR));
  17. if (lpBuffer)
  18. SetDlgItemText(hDialog,IDC_CONNECTION_REQ,lpBuffer);
  19. }
  20. if(dwRetCode == 1)
  21. {
  22. memset(lpBuffer,0,sizeof(lpBuffer));
  23. LoadString(GetInstanceHandle(),IDS_WWW_CONNECTION_DESC,lpBuffer,sizeof(lpBuffer)/sizeof(TCHAR));
  24. if (lpBuffer)
  25. SetDlgItemText(hDialog,IDC_CONNECTION_DESC,lpBuffer);
  26. memset(lpBuffer,0,sizeof(lpBuffer));
  27. LoadString(GetInstanceHandle(),IDS_WWW_CONNECTION_REQ,lpBuffer,sizeof(lpBuffer)/sizeof(TCHAR));
  28. if (lpBuffer)
  29. SetDlgItemText(hDialog,IDC_CONNECTION_REQ,lpBuffer);
  30. }
  31. if(dwRetCode == 2)
  32. {
  33. memset(lpBuffer,0,sizeof(lpBuffer));
  34. LoadString(GetInstanceHandle(),IDS_PHONE_CONNECTION_DESC,lpBuffer,sizeof(lpBuffer)/sizeof(TCHAR));
  35. if (lpBuffer)
  36. SetDlgItemText(hDialog,IDC_CONNECTION_DESC,lpBuffer);
  37. memset(lpBuffer,0,sizeof(lpBuffer));
  38. LoadString(GetInstanceHandle(),IDS_PHONE_CONNECTION_REQ,lpBuffer,sizeof(lpBuffer)/sizeof(TCHAR));
  39. if (lpBuffer)
  40. SetDlgItemText(hDialog,IDC_CONNECTION_REQ,lpBuffer);
  41. }
  42. }