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.

42 lines
1.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: hlptable.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef __GLOBAL_HELP_TABLE__
  11. #define __GLOBAL_HELP_TABLE__
  12. //=============================================================================
  13. // Global Help Table for many Dialog IDs
  14. //
  15. #define SET_HELP_TABLE(nIDD) m_pHelpTable = ::FindHelpTable(__pGlobalCSHelpTable, nIDD)
  16. #define DLG_HELP_ENTRY(nIDD) {nIDD, g_aHelpIDs_##nIDD}
  17. struct CGlobalHelpTable{
  18. UINT nIDD;
  19. const DWORD *pdwTable;
  20. };
  21. inline const DWORD* FindHelpTable(const CGlobalHelpTable *pGTable, UINT nIDD)
  22. {
  23. const DWORD* pdwTable = NULL;
  24. if(pGTable)
  25. {
  26. while(pGTable->nIDD && pGTable->nIDD != nIDD)
  27. pGTable++;
  28. if(pGTable->nIDD)
  29. pdwTable = pGTable->pdwTable;
  30. }
  31. return pdwTable;
  32. };
  33. extern const CGlobalHelpTable __pGlobalCSHelpTable[];
  34. #endif //__GLOBAL_HELP_TABLE__