Jump to content
Sign in to follow this  
E1M1

How to use C++ made custom control with autoit?

Recommended Posts

E1M1

I made "new" window control in C++ but I dont know how to use it with autoit. autoit.pri.ee/downloads/gird.zip Zip contains dll and C++ project.How do I add/remove rows with autoit? and how do I draw this control on autoit's window?


edited

Share this post


Link to post
Share on other sites
danielkza

You register a class for you custom control using RegisterClass (C++), create the control with _WinAPI_CreateWindowEx and interact with it with messages (AutoIt).

Edited by danielkza

Share this post


Link to post
Share on other sites
E1M1

where do I put RegisterClass in my source code? I am not good wit c++ yet, just used graphical designer to do it.


edited

Share this post


Link to post
Share on other sites
Richard Robertson

Are you sure you should be designing custom controls if you don't even know how to use them?

Now I'm curious. How are you even using this C++ custom control in AutoIt?

Share this post


Link to post
Share on other sites
E1M1

Isn't there documentation about this? I wonder how you would feel if there would be something you really really need, and then people would say you that you shouldn't do this at all.

Edited by E1M1

edited

Share this post


Link to post
Share on other sites
Richard Robertson

There's plenty of documentation on it. It's called the MSDN.

RegisterClass http://msdn.microsoft.com/en-us/library/ms633586%28VS.85%29.aspx

No one said that you shouldn't do it. I'm just questioning your level of skill.

You register the window class in the C++ source code. Then to add it to your window, you add a child control using this class. There's nothing more complex than that.

Share this post


Link to post
Share on other sites
Mat

You're not using native cpp so you are going to struggle.

I *think* (having never tried) that setting [assembly:ComVisible(true)]; and registering the dll will let you use it through com, if not then I seem to remember reading the AutoItobject project has recently been extended to allow you to use com dlls. I hold no responsibility for the accuracy of this paragraph though :)

Share this post


Link to post
Share on other sites
Valik

As long as we agree that we don't actually need anything beyond the essentials for life and that our usage of the word need is intentionally incorrect, I need a lot of things I'm incapable of creating myself. You don't see me trying to create them. I'm not speaking just of software here, either. I could certainly use a nice new car but I'm not trying to build one because I lack the ability to do so. You lack the ability to create whatever it is you wish to create so instead of doing something sensible like trying to build your knowledge up slowly you're just annoying people on the forum asking a bunch of stupid, basic, documented questions and learning nothing in the process. Also, you're either out-right lying or just plain don't understand what the word "understood" means:

I understood that function, but I don't know where where to put it in my C++ code

You cannot understand that function if you do not know how to use it. That should be rather obvious and the fact that it's not raises a lot of red flags. Edited by Valik
Fixed quote tag

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.