You're reading the documentation for an older, but still supported version
(GL013300).
For information on the latest version, please have a look at GL013301.
For information on the latest version, please have a look at GL013301.
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 |
Response value from the popup window |
Return
Value |
Description |
|---|---|
0 |
Failed — unable to process the popup response. |
1 |
Success — popup response successfully processed. |
Example
#include "DRFLEx.h"
#include <iostream>
using namespace DRAFramework;
int main() {
CDRFLEx Drfl;
// Simulate: DRL program triggers a popup (e.g., "Continue operation?")
std::cout << "[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);
std::cout << "User selected RESUME — continuing program execution.\n";
} else {
Drfl.tp_popup_response(POPUP_RESPONSE_STOP);
std::cout << "User selected STOP — halting DRL execution.\n";
}
return 0;
}
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.