Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #9465
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Vo as service a pop error, how to close 3rd party window |
| Date | 2016-06-21 09:12 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <nkbi05$t24$1@gioia.aioe.org> (permalink) |
| References | <0d2ab23b-982c-44c3-adf4-ed2d86837fab@googlegroups.com> <6aeb23dd-9f9c-4e2b-a40f-1d769d993d94@googlegroups.com> |
Phil.
Your syntax looks fine. The only reason I mentioned postmessage instead of
sendmessage is with the VOGUI, sometimes the messages get lost. The post
puts it on the end of the que and lets other things finish up before it gets
executes.
Regards,
Willie
Grafx Development Team
"Sherlock" wrote in message
news:6aeb23dd-9f9c-4e2b-a40f-1d769d993d94@googlegroups.com...
Willy..
This actually works.. I start a timer and all goes well kill it.
But a time delay like crash "Assertion Failed" want to close window from
within the service. Does this syntax look right for reading caption and
matching.
Phil
CASE (oEvent:uMsg == WM_TIMER) .AND. (oEvent:WParam =
IDT_ERROR_ASSERT_FAILED)
cCaptionTitle := "Assertion Failed"
hWnd_Current := GetActiveWindow()
hWnd_Stop := hWnd_Current
// 'Loop until you hit the current window again.
DO WHILE TRUE
// 'Get the next window handle.
hWnd_Current := GetWindow( hWnd_Current, GW_HWNDNEXT )
// 'Get the text from the window's caption.
iLen := GetWindowText( hWnd_Current, String2Psz(cCaptionTitle),
SLen(cCaptionTitle) )
IF iLen > 0
IF At( "Assertion Failed", cCaptionTitle ) > 0
hWnd_Target := hWnd_Current
SendMessage(hWnd_Target, WM_CLOSE, 0l, 0l)
EXIT
ENDIF
ENDIF
IF hWnd_Current = hWnd_Stop .OR. hWnd_Current = NULL_PTR
EXIT
ENDIF
ENDDO
KillTimer(SELF:Handle(), IDT_ERROR_ASSERT_FAILED)
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Vo as service a pop error, how to close 3rd party window Sherlock <sherlock@sherlock.com.au> - 2016-06-20 02:34 -0700
Re: Vo as service a pop error, how to close 3rd party window Dave Francis <suilvenassociates@googlemail.com> - 2016-06-20 02:45 -0700
Re: Vo as service a pop error, how to close 3rd party window "Willie Moore" <williem@wmconsulting.com> - 2016-06-20 12:24 -0500
Re: Vo as service a pop error, how to close 3rd party window Sherlock <sherlock@sherlock.com.au> - 2016-06-21 00:41 -0700
Re: Vo as service a pop error, how to close 3rd party window "Willie Moore" <williem@wmconsulting.com> - 2016-06-21 09:12 -0500
Re: Vo as service a pop error, how to close 3rd party window Sherlock <sherlock@sherlock.com.au> - 2016-06-21 22:55 -0700
csiph-web