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.

151 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. clientcp.c
  5. Abstract:
  6. Functions for handling events in the "Client Cover Page" tab of
  7. the fax client configuration property sheet
  8. Environment:
  9. Fax configuration applet
  10. Revision History:
  11. 03/13/96 -davidx-
  12. Created it.
  13. mm/dd/yy -author-
  14. description
  15. --*/
  16. #include "faxcpl.h"
  17. #include "coverpg.h"
  18. BOOL
  19. ClientCoverPageProc(
  20. HWND hDlg,
  21. UINT message,
  22. UINT wParam,
  23. LONG lParam
  24. )
  25. /*++
  26. Routine Description:
  27. Procedure for handling the "Client Cover Page" tab
  28. Arguments:
  29. hDlg - Identifies the property sheet page
  30. message - Specifies the message
  31. wParam - Specifies additional message-specific information
  32. lParam - Specifies additional message-specific information
  33. Return Value:
  34. Depends on the value of message parameter
  35. --*/
  36. {
  37. INT cmdId;
  38. switch (message) {
  39. case WM_INITDIALOG:
  40. Assert(ValidConfigData(gConfigData) && gConfigData->pCPInfo == NULL);
  41. gConfigData->pCPInfo =
  42. AllocCoverPageInfo(gConfigData->configType == FAXCONFIG_WORKSTATION);
  43. InitCoverPageList(gConfigData->pCPInfo, hDlg);
  44. return TRUE;
  45. case WM_COMMAND:
  46. switch (cmdId = GET_WM_COMMAND_ID(wParam, lParam)) {
  47. case IDC_COVERPG_ADD:
  48. case IDC_COVERPG_NEW:
  49. case IDC_COVERPG_OPEN:
  50. case IDC_COVERPG_REMOVE:
  51. //
  52. // User clicked one of the buttons for managing cover page files
  53. //
  54. cmdId = (cmdId == IDC_COVERPG_REMOVE) ? CPACTION_REMOVE :
  55. (cmdId == IDC_COVERPG_OPEN) ? CPACTION_OPEN :
  56. (cmdId == IDC_COVERPG_NEW) ? CPACTION_NEW : CPACTION_BROWSE;
  57. ManageCoverPageList(hDlg,
  58. gConfigData->pCPInfo,
  59. GetDlgItem(hDlg, IDC_COVERPG_LIST),
  60. cmdId);
  61. break;
  62. case IDC_COVERPG_LIST:
  63. switch (GET_WM_COMMAND_CMD(wParam, lParam)) {
  64. case LBN_SELCHANGE:
  65. UpdateCoverPageControls(hDlg);
  66. break;
  67. case LBN_DBLCLK:
  68. //
  69. // Double-clicking in the cover page list is equivalent
  70. // to pressing the "Open" button
  71. //
  72. ManageCoverPageList(hDlg,
  73. gConfigData->pCPInfo,
  74. GetDlgItem(hDlg, cmdId),
  75. CPACTION_OPEN);
  76. break;
  77. }
  78. break;
  79. default:
  80. return FALSE;
  81. }
  82. return TRUE;
  83. case WM_NOTIFY:
  84. switch (((NMHDR *) lParam)->code) {
  85. case PSN_SETACTIVE:
  86. break;
  87. case PSN_APPLY:
  88. return PSNRET_NOERROR;
  89. }
  90. break;
  91. case WM_HELP:
  92. case WM_CONTEXTMENU:
  93. return HandleHelpPopup(hDlg, message, wParam, lParam, CLIENT_COVERPG_PAGE);
  94. }
  95. return FALSE;
  96. }