toolbarEditbox.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. #ifndef NULLSOFT_WINAMP_OMBROWSER_TOOLBAREDITBOX_HEADER
  2. #define NULLSOFT_WINAMP_OMBROWSER_TOOLBAREDITBOX_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. class ToolbarEditboxHost;
  8. BOOL ToolbarEditbox_AttachWindow(HWND hEditbox, ToolbarEditboxHost *host);
  9. #define NTEBM_FIRST (WM_APP + 2)
  10. #define NTEBM_SELECTALL (NTEBM_FIRST + 0)
  11. #define NTEBM_UPDATECURSOR (NTEBM_FIRST + 1) // internal
  12. class __declspec(novtable) ToolbarEditboxHost
  13. {
  14. public:
  15. virtual void EditboxDestroyed(HWND hwnd) = 0;
  16. virtual BOOL EditboxKillFocus(HWND hwnd, HWND hFocus) = 0; // return TRUE if handled
  17. virtual void EditboxResetText(HWND hwnd) = 0;
  18. virtual void EditboxNavigateNextCtrl(HWND hwnd, BOOL fForward) = 0;
  19. virtual void EditboxAcceptText(HWND hwnd) = 0;
  20. virtual BOOL EditboxKeyDown(HWND hwnd, UINT vKey, UINT state) = 0; // return TRUE if handled;
  21. virtual BOOL EditboxKeyUp(HWND hwnd, UINT vKey, UINT state) = 0; // return TRUE if handled;
  22. virtual BOOL EditboxPreviewChar(HWND hwnd, UINT vKey, UINT state) = 0; // return TRUE if handled;
  23. };
  24. #endif // NULLSOFT_WINAMP_OMBROWSER_TOOLBAREDITBOX_HEADER