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.

50 lines
1.4 KiB

  1. // Copyright 1996-1997 Microsoft Corporation. All Rights Reserved.
  2. #ifndef _CDLG_H_
  3. #include "cdlg.h"
  4. #endif
  5. class CTopicList : public CDlg
  6. {
  7. public: // Constructors
  8. CTopicList( CHtmlHelpControl* phhCtrl, CWTable* ptblTitles, HFONT hfont, CWTable *ptblLocations = NULL )
  9. : CDlg(phhCtrl, IDDLG_RELATED_TOPICS)
  10. {
  11. m_ptblTitles = ptblTitles;
  12. m_hfont = hfont;
  13. m_ptblLocations = ptblLocations;
  14. m_cResultCount = m_ptblTitles->CountStrings();
  15. SetUnicode(TRUE);
  16. }
  17. CTopicList( HWND hwndParent, CWTable* ptblTitles, HFONT hfont, CWTable *ptblLocations = NULL )
  18. : CDlg(hwndParent, IDDLG_RELATED_TOPICS)
  19. {
  20. m_ptblTitles = ptblTitles;
  21. m_hfont = hfont;
  22. m_ptblLocations = ptblLocations;
  23. m_cResultCount = m_ptblTitles->CountStrings();
  24. SetUnicode(TRUE);
  25. }
  26. // Methods
  27. LRESULT ListViewMsg(HWND hwnd, NM_LISTVIEW* pnmhdr);
  28. BOOL OnBeginOrEnd(void);
  29. LRESULT OnDlgMsg(UINT msg, WPARAM wParam, LPARAM lParam);
  30. void AddItems();
  31. void OnDblClick() {
  32. PostMessage(m_hWnd, WM_COMMAND, MAKELONG(IDOK, BN_CLICKED), 0); }
  33. // Data Members
  34. CWTable* m_ptblTitles;
  35. CWTable* m_ptblLocations;
  36. HFONT m_hfont;
  37. HWND m_hwndListView;
  38. int m_pos; // position in ptblTitles
  39. int m_cResultCount;
  40. SITE_ENTRY_URL* m_pUrl;
  41. SITEMAP_ENTRY* m_pSiteMapChosen;
  42. enum { IDD = IDDLG_RELATED_TOPICS };
  43. };