NU-Tech Forum Index Back to NU-Tech Web Site
NU-Tech Forum
 
 Forum FAQForum FAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Insert alert message popup

 
Post new topic   Reply to topic    NU-Tech Forum Index -> NUTS Development Kit
View previous topic :: View next topic  
Author Message
pavlon



Joined: 20 Jul 2009
Posts: 2

PostPosted: Wed Jul 29, 2009 3:58 pm    Post subject: Insert alert message popup Reply with quote

Hi!How i can insert an alert message (typical windows popup) in order to advise user in certain events?Thanks
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 28 Jun 2005
Posts: 66

PostPosted: Thu Jul 30, 2009 1:53 pm    Post subject: Reply with quote

Which kind of event? Be carefull because if you pop up a message within your process function you can stop processing!


You can find generic info here: http://msdn.microsoft.com/en-us/library/system.windows.forms.messagebox.aspx


Feel free to post your code and we'll try to help
_________________
The NU-Tech Team
Back to top
View user's profile Send private message Send e-mail
pavlon



Joined: 20 Jul 2009
Posts: 2

PostPosted: Thu Jul 30, 2009 4:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
admin
Site Admin


Joined: 28 Jun 2005
Posts: 66

PostPosted: Fri Jul 31, 2009 7:56 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    NU-Tech Forum Index -> NUTS Development Kit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group