English
Forum

Window-Find-Error

 
- Page 1 -



Nico
Madysa
i don't know so right, Why it's located, but since Kruzem to be nuts The functions to that find of Windows.
FindWindow() smears from, if no Window to the mask fit.
AddWindows works not at all. (power at use whom eagle)
lying the on XProfan10 or sooner on ME?
 
Nico Madysa
11/21/06  
 



 
- Page 2 -



GDL
Hello Nico,

by me runs too.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
11/25/06  
 




Frank
Abbing
by me too.
have Perhaps what with COM or OLE not Order? an the Dlls
 
11/25/06  
 



goes by me too windows98 SE).
 
11/25/06  
 




Sebastian
Sprenger
Hello together,
I Have The Source in this Thread now of course not tested, can Nicos Problems but understand. my programs in Profan 7.0e having itself former under windows ME (and if i remember rightly, too under windows 98) because of the Profan-function FindWindow too aufgehängt. meanwhile Have I tappt im dunkeln by the API-function supplant, since then passierte it in the same Programs never again.

straight even I had again one Testprogramm with FindWindow and AddWindows written and each in the Interpreter and in the Runtime of Profan 5.0 and Profan 7.0e launched. has itself again everything aufgehängt. After one Neustart Windows ME funktionierte it tadellos what about me could thereafter no Abstürze More reproduzieren.

Programmcode shining incidentally completely alike To his, it passierte How said already in my finished Programs (not under 500 Lines) as well as in sinnfreien Einzeilern (means without variables or any expenses).

under Windows XP against it funktionierte everything always.
Greeting, Sebastian
 
Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32
Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM
Windows Me, 1.8 Ghz, 256 MB RAM
11/25/06  
 



How very sees the hang up from?
which API verwendest You, circa Findwindow To supplant?

under the API EnumWindows finds to the here:


The EnumWindows function does hardship enumerate child windows.
Diese function is more reliable than calling the GetWindow function in a loop. on application that calls GetWindow to perform this task risks being caught in on infinite loop or referencing a handle of a window that has been destroyed.


which API stick behind FindWindow? might indeed such causes having...
 
11/26/06  
 




Sebastian
Sprenger
Hello Andreas,
at hang up Gibts not plenty To see: Profan power first its work, and once it on The Profan-function FindWindow stößt, power Profan quite nothing more and can itself only yet over Strg+old+Entf and ca. 10 sec Waiting terminate. No Fehlermeldungen, BlueScreens or like.
I use The API FindWindow with lpClassName = 0 and lpWindowName = Stringadresse.
Greeting, Sebastian
 
Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32
Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM
Windows Me, 1.8 Ghz, 256 MB RAM
11/26/06  
 




RGH
there it with the Profan-function FindWindow() possible his should, only whom beginning the Fenstertitels anzugeben (important with Programs, The whom actually Filenames on whom Window Title append), use I do not The API FindWindows (or FindWindowEx), separate following function (Delphicode):
CompileMarkSeparation
In C1 (nullterminierter String) standing the on FindWindow übergebene Parameter, IPar1 becomes zurückgegeben. what power The function very?
row 1: I ermittele the first Kindfenster the Bildschirmhintergrundes (GetDeskTopWindow)
row 2: I ermittele the first Anwendungsfenster. gives it keins, has IPar1 the value 0.
row 3: I ermittele whom Window Title this Fensters. this standing now in C2 (nullterminierter String).
row 4: as long as String C1 not the beginning the Strings C2 corresponds to and IPar 1 mismatched 0 is ... (with others Worten: The Loop becomes aborted, if no further Window existing or one suitable found watts)
row 5: there yet no suitable Window found watts, ermittele I the next Window ...
row 6: ... and which Fensteritel
row 7: and moreover with the Loop (corresponds to the EndWhile in Profan).

concise: The Loop becomes leave, if one Window found watts, which Window Title with the übergebenen String begins (then has IPar1the suitable lever) or no further Window existing (then has IPar1 the value 0).
it ought to means none drop give, in the these Loop unending runs.

by me exit this drop too never on. With whom it differently is, the ought to simply time above-mentioned routine in XProfan umsetzen and try. then should itself detect let, what there schief runs. here The Rouitine in XProfan:
CompileMarkSeparation
 $H windows.ph
 $H messages.ph

Proc XFindWindow

    Parameters C1$
    declare IPar1%, C2$
    C2$ = Space$(32767)
    IPar1% = ~GetWindow(~GetDesktopWindow(), ~GW_Child)
    IPar1% = ~GetWindow(IPar1%, ~GW_HWndFirst)
    SendMessage(IPar1%, ~wm_GetText, 32767, Addr(C2$))

    While (Left$(C2$, Len(C1$)) <> C1$) And (IPar1% <> 0)

        IPar1% = ~GetWindow(IPar1%, ~GW_HWndNext)
        SendMessage(IPar1%, ~wm_GetText, 32767, Addr(C2$))

    EndWhile

    Return IPar1%

ENDPROC

CLS
Print Result =   + Str $(XFindWindow(XProfan))
WaitInput
End

for jegliche Info be I grateful.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
11/26/06  
 




Sebastian
Sprenger
Hello Roland,
habs under windows ME probiert. it's located In any accrue WM_GETTEXT in Context with Windows, The not react.

I Have first some Program crash and then The FindWindow-routine run. These running first moreover, as i not More reagierende Program over the Taskmanager exits having.

Sometime given GetWindow(IPar1, GW_HWndNext) then at a single blow a handle back, with the WM_GETTEXT stick stayed, to the itself too otherwise nothing detect let and with the safety neither in the Taskmanager auftauchte.
Greeting, Sebastian
 
Profan² 7.0e, XProfan 9, 11.2a, FreeProfan32
Windows Vista Home Premium 32-Bit, 2.8 Ghz, 4 GB RAM
Windows Me, 1.8 Ghz, 256 MB RAM
11/26/06  
 



under XP I had with some special Windows ditto time the trouble, the my Proggi ([...] ) at detect the Fenstertextes over WM_GETTEXT a wastage made. I have then The API GetWindowText uses, the klappte fine (is not the idealste lane). too The API SendMessageTimeout could one time try, so regele I the now in [...] .
 
11/27/06  
 




Nico
Madysa
OK, thanks for Help all. so would at least FindWindow() clarified.
but What is with AddWindows? gives it for too one Walk-Around?
 
Nico Madysa
11/27/06  
 



Dürfte the same trouble his.
 
11/27/06  
 




Nico
Madysa
Suppi, means is that here the/The/the Walk-Around:
CompileMarkSeparation
 $H windows.ph
 $H messages.ph

Proc XAddWindow

    Parameters C1$
    declare IPar1%, C2$
    C2$ = Space$(32767)
    IPar1% = ~GetWindow(~GetDesktopWindow(), ~GW_Child)
    IPar1% = ~GetWindow(IPar1%, ~GW_HWndFirst)
    SendMessage(IPar1%, ~wm_GetText, 32767, Addr(C2$))

    While (Left$(C2$, Len(C1$)) <> C1$) And (IPar1% <> 0)

        IPar1% = ~GetWindow(IPar1%, ~GW_HWndNext)
        SendMessage(IPar1%, ~wm_GetText, 32767, Addr(C2$))
        AddString C2$

    EndWhile

ENDPROC


or?
 
Nico Madysa
11/27/06  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.651 Views

Untitledvor 0 min.
H.Brill10/08/17
Achim Engelhardt10/21/14
Michael Uckermann08/19/14
LuZiF3R03/03/12
More...

Themeninformationen



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