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.

48 lines
1.5 KiB

  1. /****************************************************************************
  2. MOUSE.CPP : Mouse callback
  3. History:
  4. 02-OCT-2000 CSLim Created
  5. ****************************************************************************/
  6. #include "private.h"
  7. #include "korimx.h"
  8. #include "icpriv.h"
  9. #include "mes.h"
  10. //+---------------------------------------------------------------------------
  11. //
  12. // _MouseCallback
  13. //
  14. //----------------------------------------------------------------------------
  15. #define IMEMOUSE_NONE 0x00 // no mouse button was pushed
  16. #define IMEMOUSE_LDOWN 0x01
  17. #define IMEMOUSE_RDOWN 0x02
  18. #define IMEMOUSE_MDOWN 0x04
  19. #define IMEMOUSE_WUP 0x10 // wheel up
  20. #define IMEMOUSE_WDOWN 0x20 // wheel down
  21. /* static */
  22. HRESULT CICPriv::_MouseCallback(ULONG uEdge, ULONG uQuadrant, DWORD dwBtnStatus, BOOL *pfEaten, void *pv)
  23. {
  24. CEditSession2 *pes;
  25. ESSTRUCT ess;
  26. HRESULT hr;
  27. CICPriv *pCicPriv = (CICPriv *)pv;
  28. if ((dwBtnStatus & (IMEMOUSE_LDOWN |IMEMOUSE_RDOWN | IMEMOUSE_MDOWN | IMEMOUSE_WDOWN)) && pCicPriv)
  29. {
  30. ESStructInit(&ess, ESCB_COMPLETE);
  31. if (pes = new CEditSession2(pCicPriv->GetIC(), pCicPriv->GetIMX(), &ess, CKorIMX::_EditSessionCallback2))
  32. {
  33. pes->Invoke(ES2_READWRITE | ES2_ASYNC, &hr);
  34. pes->Release();
  35. }
  36. }
  37. *pfEaten = fFalse;
  38. return S_OK;
  39. }