ScanFolderBrowser.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef NULLSOFT_FOLDERBROWSE_SCANFILES_DIALOG_HEADER
  2. #define NULLSOFT_FOLDERBROWSE_SCANFILES_DIALOG_HEADER
  3. #include "./folderbrowseex.h"
  4. typedef struct _FBUTTON FBUTTON;
  5. class ScanFolderBrowser : public FolderBrowseEx
  6. {
  7. public:
  8. ScanFolderBrowser(void);
  9. ScanFolderBrowser(BOOL showBckScanOption);
  10. virtual ~ScanFolderBrowser(void);
  11. void ShowBckScanOption(BOOL show) { bkScanShow = show; }
  12. void SetBckScanChecked(BOOL checked) { bkScanChecked = checked; }
  13. BOOL GetBckScanChecked(void) { return bkScanChecked; }
  14. protected:
  15. virtual void OnInitialized(void);
  16. virtual void OnSelectionChanged(LPCITEMIDLIST pidl);
  17. virtual BOOL OnValidateFailed(LPCWSTR lpName);
  18. virtual void OnSelectionDone(LPCITEMIDLIST pidl);
  19. virtual INT_PTR DialogProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
  20. void OnWindowPosChanging(WINDOWPOS *lpwp);
  21. void OnSize(UINT nType, int cx, int cy);
  22. BOOL OnNotify(UINT idCtrl, LPNMHDR pnmh, LRESULT *result);
  23. BOOL OnCommand(UINT idCtrl, UINT idEvnt, HWND hwndCtrl);
  24. LRESULT OnToolBarCustomDraw(LPNMTBCUSTOMDRAW pnmcd);
  25. void OnToolTipGetDispInfo(LPNMTTDISPINFOW lpnmtdi);
  26. private:
  27. void LoadBookmarks(void);
  28. void FreeBookmarks(void);
  29. void ShiftWindows(int cx);
  30. void ShrinkWindows(int cx);
  31. void RepositionWindows(void);
  32. private:
  33. FBUTTON *buttons;
  34. int buttonsCount;
  35. HBRUSH hbBorder;
  36. BOOL bkScanChecked;
  37. BOOL bkScanShow;
  38. IAutoComplete *pac;
  39. IACList2 *pacl2;
  40. wchar_t selectionPath[MAX_PATH]; // this is here only because i'm lazy
  41. friend static void Initialize(ScanFolderBrowser *browser, BOOL showBckScan, BOOL checkBckScan);
  42. };
  43. #endif //NULLSOFT_FOLDERBROWSE_SCANFILES_DIALOG_HEADER