OraFormsCreateMessageFromHandler Function

Action

This function creates a new message with same handler id and class id as the handler specified in the function call.

Include file

OraForms.bdh

Syntax

OraFormsCreateMessageFromHandler(
     in nHandlerName : number,
     in nType        : number) : number;

Return value

  • A handle to the created message on success.

  • 0 otherwise.

Parameter Description
nHandlerName The name of an existing handler. The message to be created will inherit the handler id and class id of this handler.
nType

Type of message to be created. Available options are:

  • ORA_MSG_TYPE_CREATE

  • ORA_MSG_TYPE_UPDATE

  • ORA_MSG_TYPE_DESTROY

  • ORA_MSG_TYPE_GET

  • ORA_MSG_TYPE_TERMINAL

Example

  transaction TMain
  var
    nFlexId : number;
    gnUmsg  : number;
    subMsg  : number;
  begin  
    OraFormsSetConnectMode(ORA_HTTP_CONNECTION);
    // Connect - with connection properties
    OraFormsSetInt("INITIAL_VERSION", 608);
    OraFormsSetPoint("INITIAL_RESOLUTION", 96, 96);
    OraFormsSetPoint("INITIAL_DISP_SIZE", 1024, 768);
    OraFormsSetInt("INITIAL_COLOR_DEPTH", 256);
    OraFormsSetString("FONT_NAME", "Dialog");
    OraFormsSetPoint("INITIAL_SCALE_INFO", 8, 18);
    OraFormsSetBoolean("WINSYS_REQUIREDVA_LIST", false);
    OraFormsConnect("server module=Person3.fmx userid= useSDI=yes record=names");
    // New window activated: Logon
    OraFormsSetWindow("Logon");
    OraFormsLogon("user", "password", "orcl_server");
    OraFormsBeginMessageBlock("Block#2");
    gnUmsg := OraFormsCreateMessageFromHandler("handler", ORA_MSG_TYPE_UPDATE);
    subMsg := OraFormsCreateMessage(30, 40, ORA_MSG_TYPE_UPDATE);
    OraFormsAddPropertyMessage(gnUmsg, ORA_PID_BP_FOREFILLCOL, subMsg);
    OraFormsAddPropertyInt(gnUmsg, 2601, 91);
    OraFormsAddPropertyInt(gnUmsg, 2600, 0);
    OraFormsAddPropertyByte(gnUmsg, 2600, 0);
    OraFormsAddPropertyPoint(gnUmsg, ORA_PID_INITIAL_RESOLUTION, 0, 0);
    OraFormsAddPropertyString(gnUmsg,  2600, "E");
    OraFormsPutMessage(gnUmsg);
    OraFormsPutTerminalAndWait();
    OraFormsFree(gnUmsg);
    OraFormsEndMessageBlock("Block#2")        
  end TMain;