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.

34 lines
683 B

  1. #include "stdafx.h"
  2. #include <CPropertyPageAutoDelete.hpp>
  3. UINT CALLBACK PropSheetPageProc
  4. (
  5. HWND hwnd,
  6. UINT uMsg,
  7. LPPROPSHEETPAGE ppsp
  8. )
  9. {
  10. CPropertyPageAutoDelete* pPage = (CPropertyPageAutoDelete*)(ppsp->lParam);
  11. if( pPage == NULL )
  12. {
  13. return 0;
  14. }
  15. UINT nResult = (*(pPage->m_pfnOldPropCallback))(hwnd, uMsg, ppsp);
  16. if (uMsg == PSPCB_RELEASE)
  17. {
  18. delete pPage;
  19. }
  20. return nResult;
  21. }
  22. CPropertyPageAutoDelete::CPropertyPageAutoDelete
  23. (
  24. UINT nIDTemplate
  25. ):CPropertyPage(nIDTemplate)
  26. {
  27. m_pfnOldPropCallback = m_psp.pfnCallback;
  28. m_psp.pfnCallback = PropSheetPageProc;
  29. }