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.

45 lines
944 B

  1. //____________________________________________________________________________
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999
  5. //
  6. // File: MMCUtil.h
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions: ListView_GetItemData
  13. //
  14. // History: 12/4/1996 RaviR Created
  15. //____________________________________________________________________________
  16. //
  17. #ifndef _MMCUTIL_H_
  18. #define _MMCUTIL_H_
  19. #define MMC_CLSCTX_INPROC (CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER)
  20. inline LPARAM ListView_GetItemData(HWND hwnd, int iItem)
  21. {
  22. LV_ITEM lvi;
  23. ZeroMemory(&lvi, sizeof(lvi));
  24. if (iItem >= 0)
  25. {
  26. lvi.iItem = iItem;
  27. lvi.mask = LVIF_PARAM;
  28. #include "pushwarn.h"
  29. #pragma warning(disable: 4553) // "==" operator has no effect
  30. VERIFY(::SendMessage(hwnd, LVM_GETITEM, 0, (LPARAM)&lvi) == TRUE);
  31. #include "popwarn.h"
  32. }
  33. return lvi.lParam;
  34. }
  35. #endif // _MMCUTIL_H_