tp_popup_response

This function controls the next operation (stop or resume of a paused program) based on the user’s response to a popup message that appeared during DRL program execution.

Definition
DRFLEx.h within class CDRFLEx, public section (line 680)

bool tp_popup_response(POPUP_RESPONSE eRes)
{
    return _tp_popup_response(_rbtCtrl, eRes);
};

Parameter

Parameter Name

Data Type

Default Value

Description

eRes

POPUP_RESPONSE

Response value from the popup window

Return

Value

Description

0

Failed — unable to process the popup response.

1

Success — popup response successfully processed.

Example

// Simulate: DRL program triggers a popup (e.g., "Continue operation?")
printf("[DRL Popup] Continue operation? (1 = Resume, 0 = Cancel): ");
int userInput;
std::cin >> userInput;

// Send response to DRL popup based on user input
if (userInput == 1) {
    Drfl.tp_popup_response(POPUP_RESPONSE_RESUME);
    printf("User selected RESUME — continuing program execution.\n");
} else {
    Drfl.tp_popup_response(POPUP_RESPONSE_STOP);
    printf("User selected STOP — halting DRL execution.\n");
}

This example simulates handling a DRL popup event that requires user confirmation. The program prompts for input and sends a corresponding response (RESUME or STOP) using tp_popup_response(), allowing the DRL program to either continue or terminate based on the user’s decision.