English
Forum

for r 98/ME Edit box take

 
hello everyone together...

i want in my Program The Possibility having, a beliebigen Window Title one ongoing Program into mehrzeiliges Edit box aufzunehmen. How would your on The thing herangehen? How can the logical release? what would The best Possibility?
would be for each suggestion grateful, Source are not absolutely necessary.
 
07/16/04  
 



Dou you mean something like?
 {$cr}
declare a#,x%,y%,wnd&,me&
dim a#,8
def WindowFromPoint(2) !"USER32", "WindowFromPoint"
def GetCursorPos(1) !"USER32","GetCursorPos"
windowstyle 536
windowtitle "WinTit"
window 0,0 - 400,350
cls rgb(196,196,196)
me&=createmultiedit(%hwnd,"",0,0,width(%hwnd),height(%hwnd))
settimer 250

repeat

    Waitinput

    ifnot %key

        GetCursorPos(a #)
        let x%=long(a#,0)
        let y%=long(a#,4)
        let Wnd&=WindowFromPoint(x%,y%)
        settext me&, gettext$(Wnd&)

    endif

until %key=2

killtimer
dispose a#
end
 
07/16/04  
 



Hello IF...

No, really not. How one on whom Window Title comes, white I - me missing a Idea for a logische Umsetzung....
In my Program there one mehrzeiliges Edit box, into one Window Title prompt can, with its appear windows automatically herunterfährt. i want now whom users not integrally so plenty write let - it but should for users too nachvollziehbar his, what it there straight does.
I have already on a Possibility through Trackmenü virtual:
After Rechtsklick on a Fenstertitelzeile opens itself one Trackmenü with the option as verbotenes Program define.
now at write falls me too yet take off Drag and Drop one:
by the pressing the rechten Mouse button can (only) The Headline the Fensters up to my Program the Edit box wander and there take off by the release the Mouse button take off.

the wären already time two things, The programmtechnisch integrally simply To solve are. gives it further Opportunities? What is einleuchtender and rather To valet? gives it any Problems with one Rechtsklick into Headline one Fensters (others Menüs, which open... etc.)?
 
07/16/04  
 



what hold of it, simply any Window-Titles The only somehow come along simply in a list To do, and from it selectable To make. into List could one cover, which Grade as Activewin is.

Virtually:

case oldactivewindowtitle<>activewindowtitle : pushtolist activewindowtitle
 
07/16/04  
 



Hello IF...

If I you there now correctly. understood have, wished ichs really so simply neither having .
I had there sooner on such a thing virtual:
WINDOWTITLE "Fenstertitel in Editbox ziehen"
Windowstyle 31
Window 0,0-640,400
Declare Cursor#,Curx&,Cury&,Windowhandle&,Windowhandle2&
Declare Window Title$,EDIT&,EDITZähler&,TEST&,Test$
Declare Drop&,Breite&,Windowhandle3&
Def @GetAsyncKeyState(1) !"User32","GetAsyncKeyState"
Def @WindowFromPoint(2) !"USER32", "WindowFromPoint"
Def @GetCursorPos(1) !"USER32","GetCursorPos"
DEF ChildWindowFromPoint(3) !"USER32","ChildWindowFromPoint"
Def ScreenToClient(2) !"USER32","ScreenToClient"
@GetAsyncKeyState(2)
LET EDIT&=@createmultiedit(%HWND,"",10,10,300,300)

While @equ(0,0)

    IF @GetAsyncKeyState(2)<>0

        Dim Cursor#,8
        @GetCursorPos(Cursor#)
        let Curx&=long(Cursor#,0)
        let Cury&=long(Cursor#,4)
        LET Windowhandle&=@WindowFromPoint(Curx&,Cury&)
        LET Window Title$=@GetText$(Windowhandle&)
        LET Breite&=@Width(Windowhandle&)

        If Window Title$<>""

            Windowstyle 16
            Let Drop&=@createwindow(%Desktop,Window Title$,Curx&,Cury&,Breite&,0)
            SetWindowPos %HWND=0,0-640,400;-1

            While @GetAsyncKeyState(2)<>0

                @GetCursorPos(Cursor#)
                let Curx&=long(Cursor#,0)
                let Cury&=long(Cursor#,4)
                SetWindowPos Drop&=Curx&,Cury&-Breite&,0;-1
                @GetCursorPos(Cursor#)
                let Curx&=long(Cursor#,0)
                let Cury&=long(Cursor#,4)
                LET Windowhandle&=@WindowFromPoint(Curx&,Cury&)

                If Windowhandle&<>0

                    @ScreenToClient(Windowhandle&,Cursor#)
                    LET Curx&=Long(Cursor#,0)
                    LET Cury&=Long(Cursor#,4)
                    LET Windowhandle3&=@ChildWindowFromPoint(Windowhandle&,Curx&,Cury&)
                    Case Windowhandle3&<>0 : LET Windowhandle2&=Windowhandle3&

                EndIf

            wend

            @GetCursorPos(Cursor#)
            let Curx&=long(Cursor#,0)
            let Cury&=long(Cursor#,4)
            LET Windowhandle&=@WindowFromPoint(Curx&,Cury&)

            If Windowhandle&<>0

                @ScreenToClient(Windowhandle&,Cursor#)
                LET Curx&=Long(Cursor#,0)
                LET Cury&=Long(Cursor#,4)
                LET Windowhandle3&=@ChildWindowFromPoint(Windowhandle&,Curx&,Cury&)
                Case Windowhandle3&<>0 : LET Windowhandle2&=Windowhandle3&

            EndIf

            IF Windowhandle2&=Edit&

                Usecursor 2
                Let EDITZähler&=0
                Clearlist
                ADDSTRING Window Title$

                While EDITZähler&<@GetLineCount(Edit&)

                    ADDSTRING @Getline$(EDIT&,Editzähler&)
                    Let EDITZähler&=Editzähler&+1

                wend

                @MoveListToEdit(Edit&)
                Usecursor 0
                setmenuitem 0
                @setfocus(%HWND)

            endif

            @destroywindow(Drop&)

        endif

        Dispose Cursor#
        SetWindowPos %HWND=0,0-640,400;1

    endif

wend


... or so what:
WINDOWTITLE "Erfassen the Fenstertitels with Trackmenü"
Windowstyle 31
Window 0,0-640,400
Declare Cursor#,Curx%,Cury%,Windowhandle&
Declare Window Title$,EDIT&,EDITZähler&,TEST&,Test$
Def @GetAsyncKeyState(1) !"User32","GetAsyncKeyState"
Def @WindowFromPoint(2) !"USER32", "WindowFromPoint"
Def @GetCursorPos(1) !"USER32","GetCursorPos"
@GetAsyncKeyState(2)
LET EDIT&=@createmultiedit(%HWND,"",10,10,300,300)
CreateMenu
AppendMenu 433,"&Fenstertitel on Editbox senden"

While @equ(0,0)

    IF @GetAsyncKeyState(2)<>0

        Dim Cursor#,8
        @GetCursorPos(Cursor#)
        let Curx%=long(Cursor#,0)
        let Cury%=long(Cursor#,4)
        Dispose Cursor#
        LET Windowhandle&=@WindowFromPoint(Curx%,Cury%)
        LET Window Title$=@GetText$(Windowhandle&)

        IF @neq$(Window Title$,"")

            CreateMenu
            AppendMenu 433,"&Fenstertitel on Editbox senden"
            sleep 100
            TrackMenu Curx%-100,Cury%

            IF @MENUITEM(433)

                Usecursor 2
                Let EDITZähler&=0
                Clearlist
                ADDSTRING Window Title$

                While EDITZähler&<@GetLineCount(Edit&)

                    ADDSTRING @Getline$(EDIT&,Editzähler&)
                    Let EDITZähler&=Editzähler&+1

                wend

                @MoveListToEdit(Edit&)
                Usecursor 0
                setmenuitem 0
                @setfocus(%HWND)
                @GetAsyncKeyState(2)

            endif

        endif

    endif

wend


... but How you see, is the everything not so integrally ideal. Can there somewhere yet what improve?
 
07/17/04  
 



now, I find following Variante well on the ehrlichsten, uses neither 100%Rechenleistung, and habs time quick dahingepinselt:

 {$crq}
declare winlist$,wintit$,owintit$,vlb&,mov&,edit&,tmps$
windowtitle "Erfassen the Fenstertitels with Trackmenü"
Windowstyle 31+512
Window 0,0-640,400
setwindowpos %hwnd=0,0 - 640,400;-1
EDIT&:=@createmultiedit(%HWND,"",10,10,300,300)
vlb&:=createsortedlistbox(%hwnd,"",350,10,sub(width(%hwnd),370),300)
mov&:=createbutton(%hwnd,"<",315,10,30,300)
winlist$:=""
owintit$:=""
wintit$:=""
settimer 333

repeat

    waitinput
    pushtolist gettext$(getactivewindow())

    if or(getfocus(vlb&),getfocus(mov&))

        tmps$:=getstring$(vlb&,getcursel(vlb&))

        if len(tmps$)

            enablewindow mov&,1

            if getfocus(mov&)

                settext edit&,gettext$(edit&)+tmps$+chr $(13)+chr $(10)
                setfocus(vlb&)

            endif

        else

            enablewindow mov&,0

        endif

    else

        enablewindow mov&,0

    endif

until %key=2

killtimer
end

proc pushtolist

    parameters tx$
    wintit$=lower$(trim$(tx$))

    if len(wintit$)

        if owintit$<>wintit$

            owintit$:=wintit$

            ifnot instr("°"+wintit$,winlist$)

                winlist$:=winlist$+"°"+wintit$
                addstring(vlb&,wintit$)

            endif

        endif

    endif

endproc

 
07/17/04  
 



Hello IF...

means still correctly. understood...
the sees In any drop a whole corner rather from as my idea with the Trackmenü. there my Window but already quite vollgepackt is, Better get going there well for these Solution something To tight go. I Have me therefore for the time being times for whom verschiebbaren Window Title decided.
there the program anyhow well only 2 minutes on the Piece runs, and this without the further aufwendige programs walk, have I The Prozessorauslaustung first time except eight let. nevertheless many Thanks for Info - becomes Perhaps still important...
 
07/19/04  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.044 Views

Untitledvor 0 min.
Ernst04/22/16
Jochen Roxlau10/03/14
Michaeal10/18/12
Julian Schmidt06/07/11

Themeninformationen

this Topic has 1 subscriber:

unbekannt (7x)


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