home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / LordLucifer / win32asm / files / win32asm.exe / Win32ASM / Win32Proto / W32PMouse.asm < prev    next >
Encoding:
Assembly Source File  |  1997-11-10  |  2.2 KB  |  81 lines

  1.     Page 60,190
  2.     TITLE W32PMouse - Windows 95 prototype - Mouse handling.
  3.  
  4.                 .586
  5.                 .MODEL FLAT,STDCALL
  6.  
  7.                 .NOLISTMACRO
  8.                 .NOLIST
  9.  
  10. UniCode         = 0
  11.                 INCLUDE INSTR32.MAC
  12.                 INCLUDE WIN32INC.EQU
  13.  
  14.                 INCLUDE WIN32.MAC
  15.  
  16.                 INCLUDE W32PROTO.EQU
  17.                 .LIST
  18.  
  19. ; External references.
  20.  
  21. CvDec           PROTO
  22. ErrorBox        PROTO lpszErrorMsg:DWORD
  23. SBDisplay       PROTO uSBPart:DWORD,lpszMsg:DWORD
  24.                 PAGE
  25. ; ==================================================================
  26. ; Global Data section.
  27. ; ==================================================================
  28.  
  29.     .DATA
  30.  
  31.  
  32. ; ==========================================================================
  33. ; Received a MOUSEMOVE message.
  34. ; The mouse has moved, update the mouse position display on the status bar.
  35. ; ==========================================================================
  36.  
  37.     .DATA
  38.  
  39.  
  40. MousePos        BYTE 'X:'
  41. MousePosX       BYTE '????'
  42.                 BYTE ' Y:'
  43. MousePosY       BYTE '????'
  44.                 BYTE 0
  45.  
  46.                 ALIGN DWORD
  47.  
  48.     .CODE
  49.  
  50. WinProc_WM_MOUSEMOVE PROC PUBLIC,
  51.                        hWnd:DWORD,
  52.                        wMsg:DWORD,
  53.                        wParam:DWORD,
  54.                        lParam:DWORD
  55.  
  56.     SUB EAX,EAX
  57.     MOV AX, WORD PTR lParam             ;get the Y position in EAX.
  58.     LEA EDI,MousePosY                   ;dest
  59.     MOV ECX,4                           ;#bytes
  60.     INVOKE CvDec                        ;convert to displayable ascii decimal
  61.     SUB EAX,EAX
  62.     MOV AX,WORD PTR lParam+2            ;get the X position in EAX,
  63.     LEA EDI,MousePosX                   ;dest
  64.     MOV ECX,4                           ;#bytes
  65.     INVOKE CvDec                        ;convert to displayable ascii decimal
  66.  
  67.     INVOKE SBDisplay,                   ;Display message on status area
  68.              SBPART_MOUSEMOVE,          ;use the SBPART_MOUSEMOVE section,
  69.              OFFSET MousePos            ;message to display.
  70.  
  71.     SUB EAX,EAX                         ;Good return.
  72.     RET
  73.  
  74.     UnusedParm hWnd
  75.     UnusedParm wMsg
  76.     UnusedParm wParam
  77.  
  78. WinProc_WM_MOUSEMOVE ENDP
  79.  
  80.     END
  81.