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.

66 lines
1.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: fopendlg.cpp
  8. //
  9. //--------------------------------------------------------------------------
  10. #include "pch.h"
  11. #pragma hdrstop
  12. #include "resource.h"
  13. #include "fopendlg.h"
  14. #include "termserv.h"
  15. INT_PTR CALLBACK
  16. OpenFilesWarningProc(
  17. HWND hDlg,
  18. UINT uMsg,
  19. WPARAM wParam,
  20. LPARAM lParam
  21. )
  22. {
  23. switch(uMsg)
  24. {
  25. case WM_INITDIALOG:
  26. SendDlgItemMessage(hDlg,
  27. IDC_DLGTYPEICON,
  28. STM_SETICON,
  29. (WPARAM)LoadIcon(NULL, IDI_WARNING),
  30. 0L);
  31. return TRUE;
  32. case WM_COMMAND:
  33. switch (LOWORD(wParam))
  34. {
  35. case IDOK:
  36. case IDCANCEL:
  37. EndDialog(hDlg, LOWORD(wParam));
  38. return TRUE;
  39. }
  40. break;
  41. default:
  42. break;
  43. }
  44. return FALSE;
  45. }
  46. int
  47. OpenFilesWarningDialog(
  48. HWND hwndParent
  49. )
  50. {
  51. UINT idDlgTemplate = IDD_OPEN_FILES_WARNING;
  52. if (S_OK == TS_MultipleSessions())
  53. {
  54. idDlgTemplate = IDD_OPEN_FILES_WARNING_MULTIUSER;
  55. }
  56. return (int)DialogBox(g_hInstance,
  57. MAKEINTRESOURCE(idDlgTemplate),
  58. hwndParent,
  59. OpenFilesWarningProc);
  60. }