From: Geoff Schaller on
Something is wrong.

You cannot get an event without an owner window.




"Gary" <gary.miller(a)cox.net> wrote in message
news:25243c60-6647-47c6-b81c-0a2d781f6724(a)5g2000yqz.googlegroups.com:

> Geoff
> Here is what I did to "see" what the GetObjectByHandle() Returns.
> Below you'll see that indeed it returns a null_object sometimes.
>
> METHOD BeforeDispatch(hWnd, uMsg, wParam, lParam) CLASS App
> LOCAL oObject as OBJECT
> LOCAL cOutput as STRING
> local hFile as ptr
> local cFile as string
>
> oObject := GetObjectByHandle(hWnd)
> cOutput := "Window: " + Left(Symbol2String(ClassName(oObject))
> +Space(30), 30)
> cOutput += " wParam: "+StrZero(wParam,10)+"
> lParam: "+StrZero(lParam,10) + CHR( 10 ) + CHR( 13 )
> if !File( cFile := "c:\output_text.txt" )
> hFile := FCreate( cFile )
> else
> hFile := FOpen( "c:\output_text.txt" )
> endif
> FWrite( hFile, cOutput, SLen( cOutput ) )
> FClose( hFile )
>
> return true
>
> contents of c:\output_text.txt (I'm not sure why the GetAppObject()
> sometimes returns a null_object.
>
> Window: STANDARDSHELLWINDOW wParam: 0000000008 lParam:
> 0011797534
>
> Window: STANDARDSHELLWINDOW wParam: 0000000008 lParam:
> 0011797534
>
> Window: STANDARDSHELLWINDOW wParam: 0000000000 lParam:
> 0000000000
>
> Window: wParam: 0000023031 lParam:
> 0007764700
>
> Window: wParam: 0000000001 lParam:
> 0000000000
>
> Window: wParam: 0000023031 lParam:
> 0007764700
>
> Window: STANDARDSHELLWINDOW wParam: 0000061728 lParam:
> 0000000000
>
> Window: STANDARDSHELLWINDOW wParam: 0000000000 lParam:
> 0000000000
>
> Window: wParam: 0000000000 lParam:
> 0000000000
>
> Window: STATUSBAR wParam: 0000000000 lParam:
> 0000000000
>
> Window: TOOLBAR wParam: 0000000000 lParam:
> 0000000000
>
> Window: wParam: 0000000001 lParam:
> 0000000000
>
> Window: wParam: 0000023031 lParam:
> 0007764700
>
> Window: wParam: 0000000001 lParam:
> 0000000000
>
>
> By the way, wParam 14 is keyboard combination "ctrl - shift" (we use
> it as a hotkey combination).

From: Gary on
Steve
I am on the main window when I do a ctrl-shift right mouse click. I
created a new standard application in VO and simply added the
BeforeDispatch method.

Gary
From: Gary on
Geoff
Perhaps I'm missing the obvious. Create a new application in VO and
simply add the BeforeDispatch method. That's all I did to see this
'problem'.

Gary

From: Geoff Schaller on
Can you email me the test app you created? I'd like to play with this.

In theory, what you say is impossible.


"Gary" <gary.miller(a)cox.net> wrote in message
news:031ac386-6102-40ac-919d-bdacbd91acf6(a)g35g2000yqa.googlegroups.com:

> Geoff
> Perhaps I'm missing the obvious. Create a new application in VO and
> simply add the BeforeDispatch method. That's all I did to see this
> 'problem'.
>
> Gary

First  |  Prev  | 
Pages: 1 2
Prev: Resource File
Next: Set Ansi or not