|
|||
|
dear sir;
I meet a ActiveX Event problem, please give some guide. The API Documentation : OnTalkInvited event -------------------------------------------------------------------------------- Declaration OnTalkInvited( ByVal aHandle As Long ,ByRef aOkay As Boolean ) Description OnTalkInvited event notifies about a talk request from a peer. The application should display a prompt to the user asking for a permission. Parameters aHandle Handle of the peer object firing the event. aOkay If the user wants to accept the call, this parameter must be set to True ------------------------------------------------------------------------------ Delphi sample code: procedure TfMain.GoTalkInvited(Sender: TObject; aHandle: Integer; var Ok: Wordbool); var Pr: TPeer; begin Pr := TPeer(VoiCln.GetMoniker(aHandle)); if Pr = nil then Exit; LogMsg('Call is requested from ' + UN(Pr.Username)); sndPlaySound('C:\Windows\Media\ringout.wav', SND_NODEFAULT); sndPlaySound('C:\Windows\Media\ringout.wav', SND_NODEFAULT Or SND_ASYNC); SetForegroundWindow(Handle); fAccept.Peer := Pr; if fAccept.ShowModal <> mrOk then Exit; Ok := True; end; my code: VoiCln.activex.OnTalkInvited=function(aHandle,aOka y) { var ret = Dialogs.msgBox("Please choose", "Ok or Cancel", 1); if (ret == 1) { aOkay=true; } else { aOkay=false; } } but, it's wrong, other methods and events are ok. |
|
|||
|
Javascript does not support arguments of "byref" type. However, swfkit has a way to deal with "byref" arguments of an ActiveXObject event, which is, if an argument is byref, it will be converted to an object, and then you can get or set its value with the "value" property of the object.
Code:
trace(aOkay.value); aOkay.value = true; |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|