| View previous topic :: View next topic |
| Author |
Message |
pavlon
Joined: 20 Jul 2009 Posts: 2
|
Posted: Wed Jul 29, 2009 3:58 pm Post subject: Insert alert message popup |
|
|
| Hi!How i can insert an alert message (typical windows popup) in order to advise user in certain events?Thanks |
|
| Back to top |
|
 |
admin Site Admin

Joined: 28 Jun 2005 Posts: 66
|
|
| Back to top |
|
 |
pavlon
Joined: 20 Jul 2009 Posts: 2
|
Posted: Thu Jul 30, 2009 4:48 pm Post subject: |
|
|
Infact I used "messagebox" function to advise user in case he click Play without the filter is calculated.
Through popup I want that clicking on "OK" filter is calculated (and the stream can start) while clicking on "Cancel" the stream must not start.
Does it possible?
Here is the code
| Code: |
void __stdcall PlugIn::LEPlugin_Init()
{
if(!IsCalculated){
int a=MessageBoxA(NULL, "You must calculate Impulse Response before!Do you want to calculate it now?", "Warning", MB_ICONWARNING | MB_OKCANCEL);
switch (a){
case IDOK:
Calc(); //the function that calculates my filter
break;
case IDCANCEL:
// In this case I want that the stream doesn't start!
break;
}
}
} |
|
|
| Back to top |
|
 |
admin Site Admin

Joined: 28 Jun 2005 Posts: 66
|
Posted: Fri Jul 31, 2009 7:56 am Post subject: |
|
|
You cannot control streaming start/stop within a NUTS. This is an advanced feature available with NU-Module technology which is not yet available for developers.
What you can do is setting a flag remebering user's choice and refer to it in your process function like:
| Code: |
int __stdcall PlugIn::LEPlugin_Process( PinType **Input,PinType **Output,LPVOID ExtraInfo )
{
if(USERSCHOICE==OK)
do_calculation()
else
send_zeros_to_output_or_copy_input_data()
}
|
_________________ The NU-Tech Team |
|
| Back to top |
|
 |
|