SlimShady Posted October 20, 2004 Share Posted October 20, 2004 I was just wondering. Can we add Windows controls in a GUI dialog? Thinking about it... DllCall can run any function. So we can create a GUI from scratch using Createwindow. I know where I would bump into a problem: There are functions that need other info than numbers or strings, like "long", "byte", "pointer", "dword", etc. Link to comment Share on other sites More sharing options...
this-is-me Posted October 20, 2004 Share Posted October 20, 2004 You would probably be able to add them, but not be able to check when someone did something with them like clicking. A person could make a funny joke program to add buttons to messageboxes. Who else would I be? Link to comment Share on other sites More sharing options...
SlimShady Posted October 20, 2004 Author Share Posted October 20, 2004 Conclusion: There are 2 things we can do. 1. Beg the developers to add a Windows control 2. Learn C++ and add them ourselves in AutoIt. Link to comment Share on other sites More sharing options...
this-is-me Posted October 20, 2004 Share Posted October 20, 2004 3. Learn c++ and expand dllcall. The above is what I am currently learning c++ for. Who else would I be? Link to comment Share on other sites More sharing options...
Valik Posted October 20, 2004 Share Posted October 20, 2004 I hope thats not your only reason because if it is, thats a complete waste of time. There are technical limitations to the language that (rightly) prevent the sort of trickery necessary to acheive a satisfactory result. About the only solution is to literally write your own DLL and hard code read/write access points along with object factories for every type you wish to support. For example, given the following structure (Fictional): struct HoldData { int a; // Other members } In order to wrap that, you would need to export the following from a DLL: void Create_HoldData(void **out) { *out = new HoldData; // Must be a pointer, unsafe to pass objects across DLL/EXE line } void Destroy_HoldData(void *in) { delete in; } int Get_a(void *in) { return (HoldData*)in->a; } void Set_a(void *in, int _a) { (HoldData*)in->a = _a; } // Other members My casts may be off, ignore that, its concept code. Basically, you'd have to create a function to create the object, one to destroy it, then any member you wish to read/write to would need wrapped in a function as well. You would then compile this into a DLL and then use DllCall() to create objects (Assuming Jon adds a place to store a void* in the Variant class). Link to comment Share on other sites More sharing options...
this-is-me Posted October 20, 2004 Share Posted October 20, 2004 No, it's not my only reason. I aslo have a great many projects that just can't be done in VB because of the complexity in comparison to C++. Yes, I know c++ is complex but forcing VB to do something that it doesn't normally support is very taxing to the mind. I am learning C++ to be able to do things that I normally couldn't. If I happen to run up on a problem with autoit like this that nobody else seems interested in, I will also try to contribute. Who else would I be? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now