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.

99 lines
3.6 KiB

  1. /****************************************************************************\
  2. *
  3. * picsdlg.h
  4. *
  5. * Created: William Taylor (wtaylor) 01/22/01
  6. *
  7. * MS Ratings Pics Ratings Property Page
  8. *
  9. \****************************************************************************/
  10. #ifndef PICS_DIALOG_H
  11. #define PICS_DIALOG_H
  12. #include "basedlg.h" // CBasePropertyPage
  13. // #define RATING_LOAD_GRAPHICS
  14. typedef HINSTANCE (APIENTRY *PFNSHELLEXECUTE)(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd);
  15. class CPicsDialog : public CBasePropertyPage<IDD_RATINGS>
  16. {
  17. private:
  18. static DWORD aIds[];
  19. PRSD * m_pPRSD;
  20. public:
  21. CPicsDialog( PRSD * p_pPRSD );
  22. void PicsDlgSave( void );
  23. BOOL InstallDefaultProvider( void );
  24. public:
  25. typedef CPicsDialog thisClass;
  26. typedef CBasePropertyPage<IDD_RATINGS> baseClass;
  27. BEGIN_MSG_MAP(thisClass)
  28. MESSAGE_HANDLER(WM_SYSCOLORCHANGE, OnSysColorChange)
  29. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  30. MESSAGE_HANDLER(WM_HSCROLL, OnScroll)
  31. MESSAGE_HANDLER(WM_VSCROLL, OnScroll)
  32. COMMAND_ID_HANDLER(IDC_DETAILSBUTTON, OnDetails)
  33. NOTIFY_CODE_HANDLER(PSN_SETACTIVE, OnSetActive)
  34. NOTIFY_CODE_HANDLER(PSN_APPLY, OnApply)
  35. NOTIFY_CODE_HANDLER(PSN_RESET, OnReset)
  36. NOTIFY_CODE_HANDLER(TVN_ITEMEXPANDING, OnTreeItemExpanding)
  37. NOTIFY_CODE_HANDLER(TVN_SELCHANGED, OnTreeSelChanged)
  38. MESSAGE_HANDLER(WM_HELP, OnHelp)
  39. MESSAGE_HANDLER(WM_CONTEXTMENU, OnContextMenu)
  40. CHAIN_MSG_MAP(baseClass)
  41. END_MSG_MAP()
  42. protected:
  43. LRESULT OnSysColorChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  44. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  45. LRESULT OnScroll(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  46. LRESULT OnDetails(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  47. LRESULT OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  48. LRESULT OnApply(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  49. LRESULT OnReset(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  50. LRESULT OnTreeItemExpanding(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  51. LRESULT OnTreeSelChanged(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  52. LRESULT OnHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  53. LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  54. protected:
  55. void SetTreeImages( HWND hwndTV, HIMAGELIST himl );
  56. BOOL InitTreeViewImageLists(HWND hwndTV);
  57. void LaunchRatingSystemSite( void );
  58. void PicsDlgInit( void );
  59. void KillTree(HWND hwndTree, HTREEITEM hTree);
  60. void PicsDlgUninit( void );
  61. #ifdef RATING_LOAD_GRAPHICS
  62. POINT BitmapWindowCoord( int nID );
  63. void LoadGraphic( char *pIcon, POINT pt );
  64. #endif
  65. PicsEnum * PosToEnum(PicsCategory *pPC, LPARAM lPos);
  66. void NewTrackbarPosition( void );
  67. void SelectRatingSystemNode( PicsCategory *pPC );
  68. void SelectRatingSystemInfo( PicsRatingSystem *pPRS );
  69. void DeleteBitmapWindow( HWND & p_rhwnd );
  70. void ControlsShow( TreeNodeEnum tne );
  71. TreeNode* TreeView_GetSelectionLParam(HWND hwndTree);
  72. HTREEITEM AddOneItem(HWND hwndTree, HTREEITEM hParent, LPSTR szText, HTREEITEM hInsAfter, LPARAM lpData, int iImage);
  73. void AddCategory(PicsCategory *pPC, HWND hwndTree, HTREEITEM hParent);
  74. UserRatingSystem * GetTempRatingList( void );
  75. UserRating * GetTempRating( PicsCategory *pPC );
  76. };
  77. #endif