How to cancel OnBeforeMail event

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

How to cancel OnBeforeMail event

Postby Bengt » Thu Jun 22, 2017 1:05 pm

I want to use an external Email component and invoke that with the Email button in the VPE previews in a Dataflex program. The external component is called in a procedure OnVpeBeforeMail. As I understand from the manual, the procedure shall return 1 to cancel the operation, but the code below doesn´t cancel it. How shall it be done?

Procedure OnVpeBeforeMail

If (FIR.SendChilkatmail='Y') Begin
Send Popup to oSendChilkatEmail
Procedure_Return 1
End
Else Begin
//internal E-mail


Bengt
Bengt
 
Posts: 89
Joined: Fri Jan 27, 2006 5:29 pm

Re: How to cancel OnBeforeMail event

Postby IDEAL Software Support » Thu Jun 22, 2017 1:15 pm

I don't know how VPE is embedded into Dataflex. Assuming you are using the VPE DLL, the WIN API event handler must return this value in response to handling the VPE_BEFORE_MAIL event. Maybe the Dataflex binding is not returning the value of your procedure to the WIN API event handler. For clarification, you should consult the company which created the VPE bindings for Dataflex.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Re: How to cancel OnBeforeMail event

Postby Bengt » Mon Aug 21, 2017 4:47 pm

I got this answer from Starzen.

The issue is actually DataFlex. It doesn’t return data to windows functions

As far as I remember you have to do the following

Set Windows_Override_State to true
Procedure_Return 1

Without setting the windows_override_state property DAW always returns a 0
Bengt
 
Posts: 89
Joined: Fri Jan 27, 2006 5:29 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 16 guests

cron