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.

75 lines
1.9 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation 1996-2001.
  5. //
  6. // File: asgncnfg.cpp
  7. //
  8. // Contents: implementation of CAssignConfiguration
  9. //
  10. //----------------------------------------------------------------------------
  11. #include "stdafx.h"
  12. #include "wsecmgr.h"
  13. #include "asgncnfg.h"
  14. #include "util.h"
  15. #ifdef _DEBUG
  16. #define new DEBUG_NEW
  17. #undef THIS_FILE
  18. static char THIS_FILE[] = __FILE__;
  19. #endif
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CAssignConfiguration
  22. IMPLEMENT_DYNAMIC(CAssignConfiguration, CFileDialog)
  23. CAssignConfiguration::CAssignConfiguration(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,
  24. DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) :
  25. CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags , lpszFilter, pParentWnd)
  26. {
  27. m_bIncremental = TRUE;
  28. }
  29. BEGIN_MESSAGE_MAP(CAssignConfiguration, CFileDialog)
  30. //{{AFX_MSG_MAP(CAssignConfiguration)
  31. ON_BN_CLICKED(IDC_INCREMENTAL, OnIncremental)
  32. //}}AFX_MSG_MAP
  33. ON_MESSAGE(WM_HELP, OnHelp)
  34. END_MESSAGE_MAP()
  35. void CAssignConfiguration::OnIncremental()
  36. {
  37. CButton *btn = (CButton *)GetDlgItem(IDC_INCREMENTAL);
  38. if (!btn) {
  39. return;
  40. }
  41. m_bIncremental = !(btn->GetCheck());
  42. }
  43. BOOL CAssignConfiguration::OnHelp(WPARAM wParam, LPARAM lParam)
  44. {
  45. const LPHELPINFO pHelpInfo = (LPHELPINFO)lParam;
  46. if (pHelpInfo && pHelpInfo->iContextType == HELPINFO_WINDOW)
  47. {
  48. this->DoContextHelp ((HWND) pHelpInfo->hItemHandle);
  49. }
  50. return TRUE;
  51. }
  52. void CAssignConfiguration::DoContextHelp (HWND hWndControl)
  53. {
  54. // Display context help for a control
  55. if ( !::WinHelp (
  56. hWndControl,
  57. GetSeceditHelpFilename(),
  58. HELP_WM_HELP,
  59. (DWORD_PTR) a217HelpIDs) )
  60. {
  61. }
  62. }