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.

57 lines
1.6 KiB

  1. #ifndef _NOTIFMAP_H_
  2. #define _NOTIFMAP_H_
  3. //
  4. // Notify map macros
  5. //
  6. #define DECLARE_NOTIFY_MAP() \
  7. STDMETHOD(Notify)(LPCONSOLE2 pCons, MMC_NOTIFY_TYPE event, LPARAM arg, LPARAM param);
  8. #define BEGIN_NOTIFY_MAP(class) \
  9. HRESULT class::Notify(LPCONSOLE2 pCons, MMC_NOTIFY_TYPE event, LPARAM arg, LPARAM param) { \
  10. switch (event) {
  11. #define CHAIN_NOTIFY_MAP(baseClass) \
  12. default: return baseClass::Notify(pCons, event, arg, param);
  13. #define END_NOTIFY_MAP() \
  14. } return S_FALSE; }
  15. //
  16. // Notify map entries
  17. //
  18. #define ON_NOTIFY(type, func) \
  19. case type: return func(pCons, arg, param);
  20. #define ON_SELECT() \
  21. case MMCN_SELECT: return OnSelect(pCons, HIWORD(arg), LOWORD(arg));
  22. #define ON_RENAME() \
  23. case MMCN_RENAME: return OnRename(pCons, (LPCWSTR)param);
  24. #define ON_REMOVE_CHILDREN() \
  25. case MMCN_REMOVE_CHILDREN: return OnRemoveChildren(pCons);
  26. #define ON_EXPAND() \
  27. case MMCN_EXPAND: return OnExpand(pCons, (BOOL)arg, (HSCOPEITEM)param);
  28. #define ON_ADD_IMAGES() \
  29. case MMCN_ADD_IMAGES: return OnAddImages(pCons, (LPIMAGELIST)arg);
  30. #define ON_SHOW() \
  31. case MMCN_SHOW: return OnShow(pCons, (BOOL)arg, (HSCOPEITEM)param);
  32. #define ON_REFRESH() \
  33. case MMCN_REFRESH: return OnRefresh(pCons);
  34. #define ON_DELETE() \
  35. case MMCN_DELETE: return OnDelete(pCons);
  36. #define ON_DBLCLICK() \
  37. case MMCN_DBLCLICK: return OnDblClick(pCons);
  38. #define ON_PROPERTY_CHANGE() \
  39. case MMCN_PROPERTY_CHANGE: return OnPropertyChange(pCons, param);
  40. #endif // _NOTIFMAP_H_