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.

51 lines
1.1 KiB

  1. #include "stdafx.h"
  2. #pragma hdrstop
  3. INT_PTR CPropertyPage::StaticProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
  4. {
  5. CPropertyPage* pthis = (CPropertyPage*) GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
  6. PROPSHEETPAGE* ppage;
  7. INT_PTR fProcessed;
  8. if (uMsg == WM_INITDIALOG)
  9. {
  10. ppage = (PROPSHEETPAGE*) lParam;
  11. pthis = (CPropertyPage*) ppage->lParam;
  12. SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) pthis);
  13. }
  14. if (pthis != NULL)
  15. {
  16. fProcessed = pthis->DialogProc(hwndDlg, uMsg, wParam, lParam);
  17. }
  18. else
  19. {
  20. fProcessed = FALSE;
  21. }
  22. return fProcessed;
  23. }
  24. INT_PTR CDialog::StaticProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
  25. {
  26. CDialog* pthis = (CDialog*) GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
  27. INT_PTR fProcessed;
  28. if (uMsg == WM_INITDIALOG)
  29. {
  30. pthis = (CDialog*) lParam;
  31. SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) pthis);
  32. }
  33. if (pthis != NULL)
  34. {
  35. fProcessed = pthis->DialogProc(hwndDlg, uMsg, wParam, lParam);
  36. }
  37. else
  38. {
  39. fProcessed = FALSE;
  40. }
  41. return fProcessed;
  42. }