English
Source / code snippets

Controls Controlsmap Desktop Window lists

 
ControlsMap Controls Desktop Window lists

Created one hPic as well as 6 lists a Momentaufnahme all visible Window

as well as all on the visible Windows encompassed Controls velvet Coordinates

and Ausmaße repräsentieren.

the hPic is useful so one simply by getPixel The lists-Eintragsnummer

one Controls at a designed Bildschirmposition zurückerhält under Beachtung

the Z-axis.

Download

power from:



this:


CompileMarkSeparation
 {$cleq}
windowstyle 80
window maxx,maxy
long hPicControlsMap=create("hNewPic",maxx,maxy,$FFFFFF)
long ControlsMapLists=paintControlsMap(hPicControlsMap)//gibt einen speicher mit 6 listenhandles zurück.
drawpic hPicControlsMap,,0;0
print getcount(long(ControlsMapLists,)),"Elemente gefunden."
destroyWindow(long(ControlsMapLists,))//enthält die handles
destroyWindow(long(ControlsMapLists,4))//die x position
destroyWindow(long(ControlsMapLists,8))//die y position
destroyWindow(long(ControlsMapLists,12))//die xx position
destroyWindow(long(ControlsMapLists,16))//die yy position
destroyWindow(long(ControlsMapLists,20))//den typ, 1=fenster 2=control
waitinput
end

nProc paintControlsMap(long hPic){

    long 	\
    lst=createLongsList(),lst2=createLongsList(),\
    hsh=createLongsList(),hsx=createLongsList(),hsy=createLongsList(),hsxx=createLongsList(),hsyy=createLongsList(),hstyp=createLongsList(),\
    rc=globalAlloc(gPTR,16),rc2=globalAlloc(gPTR,16),\
    x,y,xx,yy,cnt,wnd,cnt2
    enumWindows(procAddr(paintControlsMap.enumProc),lst)
    cnt=getcount(lst)

    whileloop cnt-1,,-1 {

        wnd=SendMessage(lst,lb_getitemdata,loop,)
        getWindowRect(wnd,rc)
        sendMessage(hstyp,lb_addstring,,1)
        sendMessage(hsh,lb_addstring,,wnd)
        sendMessage(hsx,lb_addstring,,long(rc,))
        sendMessage(hsy,lb_addstring,,long(rc,4))
        sendMessage(hsxx,lb_addstring,,long(rc,8))
        sendMessage(hsyy,lb_addstring,,long(rc,12))
        sendmessage(lst2,lb_resetContent,,)
        enumChildWindows(wnd,procAddr(paintControlsMap.enumProc),lst2)
        cnt2=getcount(lst2)

        if cnt2 {

            whileloop 0,cnt2-1 {

                wnd=SendMessage(lst2,lb_getitemdata,loop,)
                getWindowRect(wnd,rc2)
                case long(rc2,)<long(rc,) : long rc2&,0=long(rc,)
                case long(rc2,4)<long(rc,4) : long rc2&,4=long(rc,4)
                case long(rc2,8)>long(rc,8) : long rc2&,8=long(rc,8)
                case long(rc2,12)>long(rc,12) : long rc2&,12=long(rc,12)
                case long(rc2,)>long(rc,8) : long rc2&,0=long(rc,8)
                case long(rc2,4)>long(rc,12) : long rc2&,4=long(rc,12)
                case long(rc2,8)<long(rc,) : long rc2&,8=long(rc,)
                case long(rc2,12)<long(rc,4) : long rc2&,12=long(rc,4)
                sendMessage(hstyp,lb_addstring,,2)
                sendMessage(hsh,lb_addstring,,wnd)
                sendMessage(hsx,lb_addstring,,long(rc2,))
                sendMessage(hsy,lb_addstring,,long(rc2,4))
                sendMessage(hsxx,lb_addstring,,long(rc2,8))
                sendMessage(hsyy,lb_addstring,,long(rc2,12))

            }

        }

    }

    globalFree(rc)
    globalFree(rc2)
    destroyWindow(lst2)
    destroyWindow(lst)
    cnt=getcount(hsh)

    if cnt {

        long dc=createCompatibleDC(hDC)
        selectObject(dc, hPic)
        selectobject(dc,getStockObject(NULL_PEN))
        selectobject(dc,getStockObject(DC_BRUSH))

        whileloop 0,cnt-1 {

            SetDCBrushColor(dc,loop)
            rectangle(dc,SendMessage(hsx,lb_getitemdata,loop,),SendMessage(hsy,lb_getitemdata,loop,),SendMessage(hsxx,lb_getitemdata,loop,)+1,SendMessage(hsyy,lb_getitemdata,loop,)+1)

        }

        deleteDC(dc)

    }

    long rt=dim(24)
    long rt&,0=hsh,hsx,hsy,hsxx,hsyy,hstyp
    return rt

}

nProc paintControlsMap.enumProc(long wnd,lst){

    PushAll
    case IsWindowVisible(wnd) and (wnd<>hwnd) : sendMessage(lst,lb_addstring,,wnd)
    PopAll
    return true

}

nproc createLongsList(){

    return Control("LISTBOX","",WS_CHILD | LBS_OWNERDRAWFIXED,,,,,hWnd,999,hInstance,)

}


79 kB
Hochgeladen:09/03/12
Downloadcounter0
Download
5 kB
Hochgeladen:09/03/12
Downloadcounter0
Download
1.385 kB
Hochgeladen:09/03/12
Downloadcounter9
Download
 
09/03/12  
 



Nachtrag: View source again fix adjusted -

small BugFixes.
 
09/03/12  
 




Julian
Schmidt
shining, super To functions.
now must You it only yet fix in your ruler-Tool reinhauen.
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
09/03/12  
 



jaja!
 
09/03/12  
 




Julian
Schmidt
might one fix NEN ego-Shooter draus write, because one Controls killen must. xD
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
09/04/12  
 



either so:  [...] 

ooooder naturally so:  [...] 

or so:  [...] 

thoroughly machbar!

Aaber Perhaps too so:  [...] 
 
09/04/12  
 




Julian
Schmidt
game-target: who creates it first thing windows crash To let. xD
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
09/04/12  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

10.043 Views

Untitledvor 0 min.
Gast.081510/03/24
Frank Reibold11/25/22
RudiB.09/03/22
H.Brill01/21/22
More...

Themeninformationen

this Topic has 2 subscriber:

iF (4x)
Julian Schmidt (3x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie