--- In [email protected], "swzoh" <[EMAIL PROTECTED]> wrote:

I updated it to capture transparent windows too.

---------------------- Magnifier.PowerPro -----------------------------
/* Shift+MouseLeft to quit */

static hWnd,hDC_TT,hDC_SC,hDC_MM,hBM,xpos,ypos,ti

if(win.exists(hWnd))
quit

static nZ=3 ;; zoom factor
static nW=xscreen/2/2/nZ ;; half the width  of small rect
static nH=yscreen/6/2/nZ ;; half the height of small rect

ti=dll.create_array(10,"i",40)
ti[10]=win.getvaraddr("ti")

hWnd=dll.call("CreateWindowEx|ui s s ui i i i i ui ui ui ui",;;+
8,"tooltips_class32","ColorZoomer",3,0,0,0,0,0,0,0,0)

dll.call("SendMessage|ui ui i a* b",hWnd,1028,0,ti)
dll.call("SendMessage|ui ui i a* v",hWnd,1041,1,ti)

hDC_TT=dll.call("GetDC|ui",hWnd)
hDC_SC=dll.call("GetDC|ui",0)
hDC_MM=dll.call("CreateCompatibleDC|ui",hDC_SC)
hBM=dll.call("CreateCompatibleBitmap|ui i i",hDC_SC,2*nW,2*nH)
dll.call("SelectObject|ui ui",hDC_MM,hBM)

dll.call("SetStretchBltMode|ui i",hDC_TT,4)

event.createms(20,0,;;+
cb(scriptfolder++?"\"++scriptname++"@Magnify")++;;+
?'++do(if(shift && mouseleft,?"event.destroythis()++'++;;+
cb(scriptfolder++?"\"++scriptname++"@Close")++?'"))')
quit

@Magnify
if(xpos!=xmouse || ypos!=ymouse)do
xpos=xmouse
ypos=ymouse

hWnd.setrect(;;+
win.makerect(xpos-nZ*nW,ypos+2*nH,xpos+nZ*nW,ypos+2*nZ*nH+2*nH))
dll.call("BitBlt|ui i i i i ui i i ui",;;+
hDC_MM,0,0,2*nW,2*nH,hDC_SC,xpos-nW,ypos-nH,0x00CC0020|0x40000000)
dll.call("StretchBlt|ui i i i i ui i i i i ui",;;+
hDC_TT,0,0,2*nZ*nW,2*nZ*nH,hDC_MM,0,0,2*nW,2*nH,0xCC0020)
endif
quit

@Close
dll.call("DeleteObject|ui",hBM)
dll.call("DeleteDC|ui",hDC_MM)
dll.call("ReleaseDC|ui ui",0,hDC_SC)
dll.call("ReleaseDC|ui ui",hWnd,hDC_TT)
hWnd.close
ti.release
quit
-----------------------------------------------------------------------

Sean






Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/power-pro/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to