DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Plugin Dll with a dialog box

 
Post new topic   Reply to topic    DPlot Forum Index -> C, C++, C#
View previous topic :: View next topic  
Author Message
franckgaz



Joined: 03 Mar 2007
Posts: 10
Location: France

PostPosted: Sat Mar 08, 2008 3:34 pm    Post subject: Plugin Dll with a dialog box Reply with quote

Hello David,

Is it possible to create a plugin dll with a dialog box (in order a to do a filter)?

Could you explain us how to do ?

Best Regards

Franck
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sun Mar 09, 2008 10:10 am    Post subject: Reply with quote

Franck,
Sure, that's possible and isn't all that different from displaying a dialog box in any other DLL. You can get the source code for the Moving Average DLL from http://www.dplot.com/plugins/generate/moving_average.zip.

The source includes an owner-draw list box that displays curve legends using the non-standard text formatting used in DPlot for subscripts, superscripts, etc.

The only real peculiarity here is what to do in the event that an action taken in the dialog procedure results in a condition that DPlot isn't prepared to handle. In particular: what should be done if as a result of selections made by the user in the dialog, you want to exceed the allowable number of curves or points for the arrays currently allocated? For all plugins you return the necessary values in the DPlot structure and a return value of PLUGIN_BADARRAYSIZE. DPlot resizes the arrays, then calls the plugin again. But at this point you usually don't want to display the dialog box again, you just want to proceed with the guts of the plugin. This plugin (and all others I distribute that include a dialog box) handles this by saving the dialog settings along with the last return code from the plugin to the registry. On entry that last return code is checked; if it is PLUGIN_BADARRAYSIZE then the plugin knows that the dialog should not be displayed again. On re-reading the above it all sounds like gibberish, but if you take a look at the source I think you'll see how it all works. Let me know if you have any questions.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> C, C++, C# All times are GMT - 5 Hours
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