Hi,
I am using FlipperGraph in my VO application and I need/want to know when the FlipperGraph control has focus. I've tried FocusChange and ControlFocusChange but to no avail. Anyone got any ideas?
Cheers
Glen Townsley
Flipper Graph
Flipper Graph
Hi Glen,
Does the ActiveX control have an event that you may hook into?
The FocusChange and ControlFocusChange only work with native VO controls and would not handle ActiveX controls.
BTW, just noticed the Flipper Graph control is discontinued.
Does the ActiveX control have an event that you may hook into?
The FocusChange and ControlFocusChange only work with native VO controls and would not handle ActiveX controls.
BTW, just noticed the Flipper Graph control is discontinued.
Flipper Graph
Hi Jamal,
It doesn't surprise me that it is discontinued. Its in a legacy application that I need to support for a few more years until we can get the rewrite done.
The ActiveX doesn't seem to have anything methods I could use. I think I'll have to use MouseClick in the DataWindow to try and simulate focus. I suspect that it in not actually getting focus which is where my problem lies.
Cheers
Glen
It doesn't surprise me that it is discontinued. Its in a legacy application that I need to support for a few more years until we can get the rewrite done.
The ActiveX doesn't seem to have anything methods I could use. I think I'll have to use MouseClick in the DataWindow to try and simulate focus. I suspect that it in not actually getting focus which is where my problem lies.
Cheers
Glen
Flipper Graph
I am not sure how you are placing the activex control on the window.
Have you tried?
to see if it gets focus.
Jamal
Have you tried?
Code: Select all
self:oDCYourActiveControl:SetFocus() // change accordingly
? self:oDCCurrentControl:Name
Jamal
Flipper Graph
Jamal,
I dropping an OLE object onto the window designer and then inheriting from FlipperGraph.
I have now worked out that I can give the graph focus by setting the TabStop property to true and tabbing through the controls. The issue therefore seems to be that the ocx is trapping the mouseclick so VO doesn't see it at all.
I've discovered an event hat may give me what I want but if it is firing, I can seem to receive it. The help for the event is attached.
I've constructed a method in the specific DashBoardWin class:
METHOD ocxCashflowGraph_FoundObject( oGrf, uID, nID, oObf, nBtn ) CLASS DashboardWin
SELF:symFocusedControl := #ocxCashFlowGraph
AltD()
RETURN NIL
where ocxCashFlowGraph is the ole object and self:symFocusedControl is the variable I want to set but it doesn't seem to get called so I assume I am not constructing it correctly.
Cheers
Glen
I dropping an OLE object onto the window designer and then inheriting from FlipperGraph.
I have now worked out that I can give the graph focus by setting the TabStop property to true and tabbing through the controls. The issue therefore seems to be that the ocx is trapping the mouseclick so VO doesn't see it at all.
I've discovered an event hat may give me what I want but if it is firing, I can seem to receive it. The help for the event is attached.
I've constructed a method in the specific DashBoardWin class:
METHOD ocxCashflowGraph_FoundObject( oGrf, uID, nID, oObf, nBtn ) CLASS DashboardWin
SELF:symFocusedControl := #ocxCashFlowGraph
AltD()
RETURN NIL
where ocxCashFlowGraph is the ole object and self:symFocusedControl is the variable I want to set but it doesn't seem to get called so I assume I am not constructing it correctly.
Cheers
Glen
- Attachments
-
- flipper.png (58.71 KiB) Viewed 442 times
Flipper Graph
Hi Glen,
please try to add a
METHOD __OCXDefEventCallback( pszEventProtoType, ptrControlHandle) CLASS <YourWindowClass>
and see if you get any calls here. This method is called by default if the OCX fires an event.
Regards
Meinhard
please try to add a
METHOD __OCXDefEventCallback( pszEventProtoType, ptrControlHandle) CLASS <YourWindowClass>
and see if you get any calls here. This method is called by default if the OCX fires an event.
Regards
Meinhard
Flipper Graph
Hi Meinhard,
I think that should help. I tested it on an activex control and I got all kinds of events.
Glen, look at this. You may want to test for cEventName
I think that should help. I tested it on an activex control and I got all kinds of events.
Glen, look at this. You may want to test for cEventName
Code: Select all
METHOD __OCXDEFEVENTCALLBACK( pszEventProtoType, ptrControlHandle) CLASS <YourWindowClass>
LOCAL cEventProtoType as STRING
LOCAL cEventName as STRING
cEventProtoType := Psz2String(pszEventProtoType)
cEventName := SubStr(cEventProtoType,1, At("(", cEventProtoType) -1 )
// ? cEventName, cEventProtoType
// for example:
if cEventName == "DblClick"
self:DoSomething()
endif
RETURN self
Flipper Graph
Thanks Jamal and Meinhard,
I've added the method
METHOD __OCXDEFEVENTCALLBACK( pszEventProtoType, ptrControlHandle ) CLASS DashboardWin
LOCAL cEventProtoType AS STRING
LOCAL cEventName AS STRING
cEventProtoType := Psz2String( pszEventProtoType )
cEventName := SubStr3( cEventProtoType,1, At( "(", cEventProtoType ) -1 )
// ? cEventName, cEventProtoType
AltD()
// for example:
// IF cEventName == "DblClick"
// SELF:DoSomething()
// ENDIF
RETURN SELF
but it does not get called. I am thinking that the method I selected in FlipperGraph itn't doing what I had hoped.
Thanks
I've added the method
METHOD __OCXDEFEVENTCALLBACK( pszEventProtoType, ptrControlHandle ) CLASS DashboardWin
LOCAL cEventProtoType AS STRING
LOCAL cEventName AS STRING
cEventProtoType := Psz2String( pszEventProtoType )
cEventName := SubStr3( cEventProtoType,1, At( "(", cEventProtoType ) -1 )
// ? cEventName, cEventProtoType
AltD()
// for example:
// IF cEventName == "DblClick"
// SELF:DoSomething()
// ENDIF
RETURN SELF
but it does not get called. I am thinking that the method I selected in FlipperGraph itn't doing what I had hoped.
Thanks
Flipper Graph
Jamal and Meinhard,
I've tries a different approach and I can see that the Dispatch of the window that owns the FipperGraph control receives a message when I left mouse click in the graph control.
The event:Message is 32 which I think is a WM_SETCURSOR but I don't understand what the wParam and lParam are.
Cheers
Glen
I've tries a different approach and I can see that the Dispatch of the window that owns the FipperGraph control receives a message when I left mouse click in the graph control.
The event:Message is 32 which I think is a WM_SETCURSOR but I don't understand what the wParam and lParam are.
Cheers
Glen
Flipper Graph
Glen,
In your PostInit(), are you using ?
self:ODCocxCashFlowGraph :CreateEmbedding("Your Control Prog ID", "Your License Key")
If the OCX is a "normal" control, the __OCXDEFEVENTCALLBACK should work, otherwise, I am running out of ideas.
Jamal
In your PostInit(), are you using ?
self:ODCocxCashFlowGraph :CreateEmbedding("Your Control Prog ID", "Your License Key")
If the OCX is a "normal" control, the __OCXDEFEVENTCALLBACK should work, otherwise, I am running out of ideas.
Jamal