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.

138 lines
3.2 KiB

  1. // fcninfvw.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "FaxApi.h"
  5. #include "fcninfvw.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. extern CFaxApiApp * pFaxApiBrowserApp;
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CFunctionInfoFormView
  14. IMPLEMENT_DYNCREATE(CFunctionInfoFormView, CFormView)
  15. CFunctionInfoFormView::CFunctionInfoFormView()
  16. : CFormView(CFunctionInfoFormView::IDD)
  17. {
  18. //{{AFX_DATA_INIT(CFunctionInfoFormView)
  19. // NOTE: the ClassWizard will add member initialization here
  20. //}}AFX_DATA_INIT
  21. }
  22. CFunctionInfoFormView::~CFunctionInfoFormView()
  23. {
  24. }
  25. void CFunctionInfoFormView::DoDataExchange(CDataExchange* pDX)
  26. {
  27. CFormView::DoDataExchange(pDX);
  28. //{{AFX_DATA_MAP(CFunctionInfoFormView)
  29. // NOTE: the ClassWizard will add DDX and DDV calls here
  30. //}}AFX_DATA_MAP
  31. }
  32. BEGIN_MESSAGE_MAP(CFunctionInfoFormView, CFormView)
  33. //{{AFX_MSG_MAP(CFunctionInfoFormView)
  34. // NOTE - the ClassWizard will add and remove mapping macros here.
  35. //}}AFX_MSG_MAP
  36. END_MESSAGE_MAP()
  37. /////////////////////////////////////////////////////////////////////////////
  38. // CFunctionInfoFormView diagnostics
  39. #ifdef _DEBUG
  40. void CFunctionInfoFormView::AssertValid() const
  41. {
  42. CFormView::AssertValid();
  43. }
  44. void CFunctionInfoFormView::Dump(CDumpContext& dc) const
  45. {
  46. CFormView::Dump(dc);
  47. }
  48. #endif //_DEBUG
  49. /////////////////////////////////////////////////////////////////////////////
  50. // CFunctionInfoFormView message handlers
  51. BOOL CFunctionInfoFormView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
  52. {
  53. BOOL fReturnValue;
  54. fReturnValue = CFormView::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
  55. if ( fReturnValue != (BOOL) FALSE )
  56. {
  57. // Save the handle to this view in the CFaxApiApp object.
  58. pFaxApiBrowserApp->StoreFunctionInfoFormViewHWND( m_hWnd );
  59. }
  60. return ( fReturnValue );
  61. }
  62. // Update the Function Paremeter edit control
  63. BOOL CFunctionInfoFormView::UpdateFunctionPrototypeEditCtrl( CString & rcsFunctionPrototype )
  64. {
  65. BOOL fReturnValue;
  66. // Get a pointer to the Function Prototype edit control.
  67. CEdit * pceFunctionPrototype;
  68. pceFunctionPrototype = (CEdit *) ((CDialog *) this)->
  69. GetDlgItem( IDC_EDIT_FUNCTION_PROTOTYPE );
  70. if ( pceFunctionPrototype != (CEdit *) NULL )
  71. {
  72. pceFunctionPrototype->SetWindowText( rcsFunctionPrototype );
  73. fReturnValue = (BOOL) TRUE;
  74. }
  75. else
  76. {
  77. fReturnValue = (BOOL) FALSE;
  78. }
  79. return ( fReturnValue );
  80. }
  81. // Update the Return Value Description edit control.
  82. BOOL CFunctionInfoFormView::UpdateReturnValueDescriptionEditCtrl( CString & rcsReturnValueDescription )
  83. {
  84. BOOL fReturnValue;
  85. // Get a pointer to the Return Value Description edit control.
  86. CEdit * pceReturnValueDescription;
  87. pceReturnValueDescription = (CEdit *) ((CDialog *) this)->
  88. GetDlgItem( IDC_EDIT_RETURN_VALUE_DESCRIPTION );
  89. if ( pceReturnValueDescription != (CEdit *) NULL )
  90. {
  91. pceReturnValueDescription->SetWindowText( rcsReturnValueDescription );
  92. fReturnValue = (BOOL) TRUE;
  93. }
  94. else
  95. {
  96. fReturnValue = (BOOL) FALSE;
  97. }
  98. return ( fReturnValue );
  99. }