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.

79 lines
1.6 KiB

  1. /*++
  2. Copyright (C) 1997-2001 Microsoft Corporation
  3. Module Name:
  4. Abstract:
  5. History:
  6. --*/
  7. // BindingSheet.cpp : implementation file
  8. //
  9. #include "stdafx.h"
  10. #include "wmitest.h"
  11. #include "BindingSheet.h"
  12. #ifdef _DEBUG
  13. #define new DEBUG_NEW
  14. #undef THIS_FILE
  15. static char THIS_FILE[] = __FILE__;
  16. #endif
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CBindingSheet
  19. IMPLEMENT_DYNAMIC(CBindingSheet, CPropertySheet)
  20. CBindingSheet::CBindingSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) :
  21. CPropertySheet(nIDCaption, pParentWnd, iSelectPage),
  22. m_bFirst(TRUE)
  23. {
  24. }
  25. CBindingSheet::CBindingSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage) :
  26. CPropertySheet(pszCaption, pParentWnd, iSelectPage),
  27. m_bFirst(TRUE)
  28. {
  29. }
  30. CBindingSheet::~CBindingSheet()
  31. {
  32. }
  33. BEGIN_MESSAGE_MAP(CBindingSheet, CPropertySheet)
  34. //{{AFX_MSG_MAP(CBindingSheet)
  35. ON_WM_PAINT()
  36. //}}AFX_MSG_MAP
  37. END_MESSAGE_MAP()
  38. /////////////////////////////////////////////////////////////////////////////
  39. // CBindingSheet message handlers
  40. void CBindingSheet::OnPaint()
  41. {
  42. CPaintDC dc(this); // device context for painting
  43. // TODO: Add your message handler code here
  44. if (m_bFirst)
  45. {
  46. CWnd *pwndOK = GetDlgItem(IDOK),
  47. *pwndCancel = GetDlgItem(IDCANCEL),
  48. *pwndApply = GetDlgItem(0x3021);
  49. RECT rectApply;
  50. pwndApply->GetClientRect(&rectApply);
  51. pwndApply->MapWindowPoints(this, &rectApply);
  52. pwndOK->MoveWindow(&rectApply);
  53. pwndApply->ShowWindow(SW_HIDE);
  54. pwndCancel->ShowWindow(SW_HIDE);
  55. m_bFirst = FALSE;
  56. }
  57. }