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.

57 lines
930 B

  1. /*++
  2. Copyright (c) 2001, Microsoft Corporation
  3. Module Name:
  4. caret.h
  5. Abstract:
  6. This file defines the CCaret Class.
  7. Author:
  8. Revision History:
  9. Notes:
  10. --*/
  11. #ifndef _CARET_H_
  12. #define _CARET_H_
  13. #include "boolean.h"
  14. #include "toggle.h"
  15. class CCaret
  16. {
  17. public:
  18. CCaret();
  19. virtual ~CCaret();
  20. public:
  21. HRESULT CreateCaret(HWND hParentWnd, SIZE caret_size);
  22. HRESULT DestroyCaret();
  23. HRESULT OnTimer();
  24. HRESULT SetCaretPos(POINT pos);
  25. HRESULT ShowCaret() { m_show.SetFlag(); return S_OK; }
  26. HRESULT HideCaret();
  27. private:
  28. HRESULT InvertCaret();
  29. HRESULT UpdateCaretPos(POINT pos);
  30. private:
  31. static const UINT_PTR TIMER_EVENT_ID = 0x4f83af91;
  32. HWND m_hParentWnd;
  33. UINT_PTR m_hCaretTimer;
  34. POINT m_caret_pos;
  35. SIZE m_caret_size;
  36. CBoolean m_show;
  37. CToggle m_toggle;
  38. };
  39. #endif // _CARET_H_