Source code of Windows XP (NT5)
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.

91 lines
1.7 KiB

  1. /********************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1987-1990 **/
  4. /********************************************************************/
  5. /*
  6. * FILE STATUS:
  7. * 12/06/90 Created
  8. * 01/02/91 renamed to just test6
  9. * 1/15/91 Split from Logon App, reduced to just Shell Test APP
  10. */
  11. /****************************************************************************
  12. PROGRAM: test6.cxx
  13. PURPOSE: Test module to test WNetConnectionDialog
  14. FUNCTIONS:
  15. test6()
  16. COMMENTS:
  17. ****************************************************************************/
  18. #ifdef CODESPEC
  19. /*START CODESPEC*/
  20. /********
  21. TEST6.CXX
  22. ********/
  23. /************
  24. end TEST6.CXX
  25. ************/
  26. /*END CODESPEC*/
  27. #endif // CODESPEC
  28. #include "apptest.hxx"
  29. /****************************************************************************
  30. FUNCTION: test6()
  31. PURPOSE: test WNetConnectionDialog
  32. COMMENTS:
  33. ****************************************************************************/
  34. void test6(HWND hwndParent)
  35. {
  36. UINT type ;
  37. switch( MessageBox(hwndParent,SZ("Browse Printer (Yes) or Drive (No) connections"),SZ("Test"),MB_YESNOCANCEL))
  38. {
  39. case IDYES:
  40. type =
  41. #ifdef WIN32
  42. RESOURCETYPE_PRINT ;
  43. #else
  44. WNTYPE_PRINTER ;
  45. #endif
  46. break ;
  47. case IDNO:
  48. type =
  49. #ifdef WIN32
  50. RESOURCETYPE_DISK ;
  51. #else
  52. WNTYPE_DISK ;
  53. #endif
  54. break ;
  55. case IDCANCEL:
  56. default:
  57. return ;
  58. }
  59. UINT rc;
  60. rc = WNetConnectionDialog ( hwndParent, type ) ;
  61. MessageBox(hwndParent,SZ("Thanks for visiting test6 -- please come again!"),SZ("Test"),MB_OK);
  62. }