If you look inside your FilterMeister installation directory, you will find lots of examples in the Democodes folder. Depending on where you have installed FilterMeister, the folder might be something like: C:\Program Files\FilterMeister\sourcecode\democodes. There are also coding examples on many pages of this Wiki.
You can use the NONE keyword with each control in the following manner:
ctl[CTL_LOGO]: NONE
The example above removes the gnome image from the bottom right corner of the plug-in interface. You can use similar code to hide the other built-in controls, such as the CTL_OK and CTL_CANCEL buttons. As of FilterMeister 1.0 Beta 9d, the only control that you can't hide is the CTL_PREVIEW. In some older versions of FilterMeister, there are some other controls you can't hide, and you may need to use a program like [Resource Hacker] to edit the plug-in interface directly.
Yes, but not by using FilterMeister code. You can design the about screen as a Windows Bitmap (BMP) file - 256 color images sized to 342 x 195 pixels seems to work best. You must first compile your plug-in into an 8bf file, then load the 8bf file using [Resource Hacker], which is a free download.
As of FilterMeister 1.0 Beta 9d, you can do this using FilterMeister code. To create a preview that is 100 DBUs wide, 200 DBUs high, and positioned 10 DBUs from the top left corner, you would use the following code:
setCtlPos(CTL_PREVIEW, 10, 10, 100, 200);
If you are stlll using an older version of FilterMeister, you will need to use [Resource Hacker] instead to resize the window. This is how you would do it:
Using Resource Hacker, you need to change WS_THICKFRAME to DS_MODALFRAME in the main dialog resource (FILTERPARAM -> 1033). This works because Modal dialog windows cannot be resized. You have to do this in your compiled .8BF files - although you can modify FilterMeister itself, the changes won't apply to your compiled plug-ins.
Take a look at the FilterWithoutDialog.ffp source code in the sourcecode/codelibrary directory. The trick is to put doAction(CA_APPLY); at the start of your OnFilterStart section, so the effect is applied immediately.
Are you dividing by the scaleFactor or zoomFactor variables anywhere in your code? It's possible for these to take the value 0 in the compiled plug-in , so if you're dividing by them you may trigger a divide by zero error... or worse, you might get an infinitely large number. If you've got a for loop somewhere going from 0 to infinity, well, your plug-in is going to hang. The solution is to check if scaleFactor == 0 before you divide by scaleFactor. If scaleFactor is 0, use an alternate equation with 1 in place of scaleFactor.
Please check if you initialized important variables to zero. This can be done, e.g., by using instead of
int MyVariable;
the following line:
int MyVariable = 0;
If a variable wasn't initialized, it doesn't necessarily have a value of zero. It can have a random value and that may not be what your code expects.
The most needed functions like src, pget, pset, getArray and putArray support 16-bit values.
You are writing 8-bit values to the 16-bit image buffer. Make sure that you use values ranging from 0 to 32768 and not just 0 to 255.
As of recent FilterMeister versions (1.0 Beta 9d), you can use the FME_INIT event to run code the when the plug-in is launched. You need to add the 'initevent' Dialog parameter to your code for this to work. Here us some example code to make it work:
%ffp
Dialog: initevent
OnCtl(n): {
if (e==FME_INIT) {
// Your code would go here
}
return false;
}