First of all: welcome to our forums!
quote:
Originally posted by Flippy
Unfortunately, I haven't got a clue how to start lol... Do I need a separate XML editor? I have Visual Studio, maybe I can use that?
There are some examples in the scripting documentation, but you'll learn the most by looking at other scripts. There are a lot of scripts which display an image in a window, have a look on how the image container is defined in the XML and how an image is assigned to the element.
You don't need a special editor, any text editor will do. It doesn't matter whether you prefer Notepad++ or Visual Studio, as long as you write valid XML and save your files as
UTF-16 with BOM, Plus! will happily read your interfaces. If you still run into trouble with your interfaces, the
Interface Tester can help you finding errors in your interface files.
quote:
Originally posted by Flippy
I suppose there is no visual editor? Eg, I cannot see the window before compiling the XML code?
No, unfortunately there isn't. Many developers on the forums here have attempted to start up such a project, but it appears none of them succeeded in finishing it. At the moment, all script developers have to write the XML themselves. It sounds difficult at first, but you'll get the hang of it very quickly.
(By the way: you don't compile XML, it is being read as-is. Saving it and re-opening the window works just fine.)
quote:
Originally posted by Flippy
Actually all I need is one window, roughly the size of the PNG image created, displaying the PNG image. Perhaps a button to close it, but that's not even a requirement. What controls am I looking at? In C# or VB I would use a picturebox, but there doesn't seem to be one..?
You're going to need a window with an ImageElement and a ButtonControl.
You'll want to set the image on the ImageElement in the interface XML to some kind of place-holder image ("Loading" or something alike) and then change the image dynamically with PlusWnd::ImageElmt_SetImageFile.
Another interesting thing you might want to use: if you simply give your button "BtnCancel" as Id, Plus! will automatically recognise it as a close button (unless you override this behaviour and add your own event handling for the button of course).
As for resizing the window according to the size of the loaded image, you're going to need a Win32 API call using Interop.Call() to
SetWindowPos (in user32.dll) and set the width and height of the window. This will require some calculations to retrieve the size needed to display the image correctly but I'm sure that with a little creativity and some help from these forums, you'll be able to get this right!
If you have any question, search the forums first to make sure whether it has already been answered and if it's not, feel free to ask here!