Roode, Eric wrote:
Okay, I've done pretty much what you said:
I've loaded the DLL (successfully).
I've created a class to represent my control.
In that class's new() function, I invoke Win32::GUI->_new.
In my main program, I position the control as usual.
The control is not rendered properly. Its "text" attribute is
displayed on the main window, just as a Label would appear.
I get no errors, but no features either.
Question: What is the "type" parameter to _new? All the controls
in Win32::GUI.pm load constants from deep in the bowels of XS.
What should it be for my custom control?
For my test control, I used the RoundButton control at
http://www.ondotnet.com/pub/a/dotnet/2002/03/18/customcontrols.html?page=2
OK, so I think we've had a disconnect on our definition of a 'control
library'. That is not a 'standard' win32 control library (at least by
my terminology) - it's not a window, with a window class that can be
created using CreateWindow() and controlled using SendMessage(). It's
some .NET dll. I'm way out of my depth when it comes to using anything
above the Win32 API, but from a quick web search, and assuming that your
building RoundButton.dll yourself (I couldn't see a download link) -
then there may be a way to do it. Sadly I cna't find the particular
article I was reading, but the steps appear to go something like this:
(1) Create the DLL (you've already done this)
(2) Register the DLL as callable via the .NET COM interop layer (there's
a tool REGASM to do this, or, I beleive, a tickbox on one of the Visual
Studio dialogs that would have the same effect)
(3) You might now be able to use the library, using Win32::GUI::AxWindow
to host the control.
Afraid I can't offer more than that, as I say I'm out of my depth here.
Rob.