Hi
I've been working on a BlueGUI type plugin, and as some of you may remember I was the first (AFAIK) to showcase a plugin to add controls to DBP apps a few years ago on the RGT forums, thought it wasn't very successful and so I didn't carry it on.
Anyway, the plugin is back, currently written in Delphi 7 PE and although I'll probably be releasing it free, I'd like to take donations which I can't do for something produced with a PE creation so I may move it over to C++ since it's all pretty much the same code, just a slightly different way of structuring functions.
Just wanted to throw out a quick demo to see how it works on the variety of systems here, only tested so far on two XP setups.
The DLL is currently at 25KB with 41 functions, most of which are general purpose. The only controls in this demo are buttons for the moment, but it's fairly easy to add labels, edits, listboxes etc... and let the plugin take care of most of it. At the moment the limits are set at 65,000 for elements (what the plugin calls controls) and 255 for font styles.
Before we reach the main attraction here's a quick overview of the functionality currently implemented.
To start the system up we have to call 'Init GUI' which sets a few default values and allows DBPs window to accept these new controls. We then have a 'Make Element Button', in the style of DBP commands, to create a button by specifying a ID and a caption. The element is then manipulated using 'Position Element' and 'Resize Element', where the resize command can take custom values or automatically resize the elements width and/or height.
When creating lots of elements you may want to keep the status of the elements hidden until the creation has finished which can be toggled with 'Create Elements Hidden' and 'Create Elements Visible'. The visibility of elements can determined with 'Element Visible', and set using 'Show Element', 'Hide Element', 'Show All Elements', and/or 'Hide All Elements'.
A font style can be created using 'Make Element Font' and applied to an element with 'Set Element Font'.
Various commands are included to get the status of elements or edit elements.
'Element Text' / 'Set Element Text'
'Enable Element' / 'Disable Element' / 'Element Enabled'
'Element Clicked'
'Paint Element' / 'Paint All Elements' (Used when an element has changed eg. font style updated and you want to show the result immediately)
'Element X'/ 'Element Y' / 'Element Width' / 'Element Height' / 'Element Type'
'Element Active' / 'Active Element' / 'Activate Element'
'Element Parent' / 'Element Parent Handle'
'Send Message Using Handle' / 'Send Message Using Element ID'
'Font Element Exists' / 'Element Exists'
That is most of the commands available currently, and although I haven't detailed the usage, they are all fairly self explanatory. Commands still to come include more controls and associated commands and parent setting.
Finally, the demo. I'd like people to try it out, check out the various results, and report anything that doesn't work. A bit of information about the demo:
1) The 'Delete Me' button is meant to get deleted upon being clicked.
2) The 'Delete Font' button removes the Times New Roman font style, and if the 'Delete Me' button is still around, update the font on that.
3) 'Get My Details' will send a message to the log containing position (X / Y), dimensions (W / H) and it's parent handle (currently set to the DBP window)
4) 'Click Me' changes text upon being clicked.
5) 'Give Focus To Get My Handle' will activate element 10. You can check this with the 'Active Element' text at the top of the screen.
6) 'Hide Tony' / 'Show Tony' do as labelled. 'Is Tony Visible?' will send a message resulting with 0 (False) or 1 (True) depending on the visibility of Tony.
7) 'Enable Simon' / 'Disable Simon' do as labelled. 'Is Simon Enabled?' will send a message to the log resulting with 0 (False) or 1 (True) depending on the visibility of Simon.
If you want XP styles (only on XP systems) you must extract the files as the manifest file is required by the application to enable theming. To disable the themes or if your running on an OS earlier than XP you can run directly from the zip.
If you have any suggestions as to functionality you'd like included then let me know.