381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
|
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
|
-
+
+
|
proc UpdateCCPosition
.aepos AEPOS
.caret AECARETXY
.rect RECT
.workrect RECT
; .workrect RECT
.prefix rb $100
.word rb $100
.aedit dd ?
.info MONITORINFO
; benchmark variables
; .time dd ?
; .count dd ?
begin
cmp [hCCList], 0
je .finish
|
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
|
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
|
+
+
-
-
+
+
-
+
+
-
+
-
|
mov eax, [.rect.right]
mov ecx, [.rect.bottom]
sub eax, [.rect.left]
sub ecx, [.rect.top]
mov [.rect.right], eax
mov [.rect.bottom], ecx
invoke MonitorFromWindow, [.aedit], 2
mov [.info.cbSize], sizeof.MONITORINFO
lea ebx, [.workrect]
invoke SystemParametersInfoA, SPI_GETWORKAREA,0,ebx,0
lea ecx, [.info]
invoke GetMonitorInfoA, eax, ecx
mov eax, [.workrect.right]
mov eax, [.info.rcWork.right]
sub eax, [.rect.right]
mov ecx, [.caret.x0]
cmp eax, ecx
jle @f
mov eax, ecx
@@:
mov edx, [.workrect.bottom]
mov edx, [.info.rcWork.bottom]
sub edx, [.rect.bottom]
mov ecx, [.caret.y1]
add ecx, 1
cmp edx, ecx
jg @f
mov ecx, [.caret.y0]
sub ecx, [.rect.bottom]
sub ecx, 2
@@:
invoke SetWindowPos, [hCCList], NULL, eax, ecx, 0, 0, SWP_NOSIZE or SWP_NOZORDER or SWP_NOACTIVATE or SWP_NOCOPYBITS
lea ebx, [.word]
|