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
1.2 KiB

  1. //
  2. // snoop.h
  3. //
  4. // CSnoopWnd declaration.
  5. //
  6. #ifndef SNOOP_H
  7. #define SNOOP_H
  8. #define MAX_SNOOP_TEXT 32
  9. class CCaseTextService;
  10. class CUpdateTextEditSession;
  11. class CSnoopWnd
  12. {
  13. public:
  14. CSnoopWnd(CCaseTextService *pCase);
  15. static BOOL _InitClass();
  16. static void _UninitClass();
  17. BOOL _Init();
  18. void _Uninit();
  19. void _Show();
  20. void _Hide();
  21. void _UpdateText(ITfRange *pRange);
  22. void _UpdateText(TfEditCookie ec, ITfContext *pContext, ITfRange *pRange);
  23. private:
  24. friend CUpdateTextEditSession;
  25. static LRESULT CALLBACK _WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  26. void _OnPaint(HWND hWnd, HDC hdc);
  27. static void _SetThis(HWND hWnd, LPARAM lParam)
  28. {
  29. SetWindowLongPtr(hWnd, GWLP_USERDATA,
  30. (LONG_PTR)((CREATESTRUCT *)lParam)->lpCreateParams);
  31. }
  32. static CSnoopWnd *_GetThis(HWND hWnd)
  33. {
  34. return (CSnoopWnd *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
  35. }
  36. CCaseTextService *_pCase;
  37. HWND _hWnd;
  38. ULONG _cchText;
  39. WCHAR _achText[MAX_SNOOP_TEXT];
  40. static ATOM _atomWndClass;
  41. };
  42. #endif // SNOOP_H