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.

67 lines
2.3 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. dialog.h
  7. base dialog class to handle help
  8. FILE HISTORY:
  9. 7/10/97 Eric Davison Created
  10. */
  11. #ifndef _DIALOG_H_
  12. #define _DIALOG_H_
  13. //----------------------------------------------------------------------------
  14. // Class: CBaseDialog
  15. //
  16. // This class is used to hold all common dialog code. Specifically, the
  17. // help code. What this requires is that the dialog user override the
  18. // GetHelpMap function and return the array of help IDs. CBaseDialog does
  19. // NOT free this array up, it is up to the derived class to do so.
  20. //
  21. // An additional way (which is a hack, but it helps because Kenn is so
  22. // lazy) is to use the SetGlobalHelpMapFunction(). If we find a global
  23. // help function, we will use that before calling GetHelpMap().
  24. //
  25. // The overridden function gets called each time a help request comes in
  26. // to pass the help IDs to WinHelp.
  27. //----------------------------------------------------------------------------
  28. class CBaseDialog : public CDialog
  29. {
  30. public:
  31. DECLARE_DYNAMIC(CBaseDialog)
  32. CBaseDialog();
  33. CBaseDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL);
  34. // Use this call to get the actual help map
  35. // this version will check the global help map first.
  36. DWORD * GetHelpMapInternal();
  37. // override this to return the app specific help map
  38. virtual DWORD * GetHelpMap() { return NULL; }
  39. protected:
  40. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  41. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  42. DECLARE_MESSAGE_MAP()
  43. };
  44. HWND FixupIpAddressHelp(HWND hwndItem);
  45. /*---------------------------------------------------------------------------
  46. The functions below are used to setup the global help map for use
  47. by the property pages and the dialog code.
  48. ---------------------------------------------------------------------------*/
  49. typedef DWORD * (*PFN_FINDHELPMAP)(DWORD dwIDD);
  50. void SetGlobalHelpMapFunction(PFN_FINDHELPMAP pfnHelpFunction);
  51. #endif // _COMMON_UTIL_H_