Sign in to follow this  
Followers 0
Bru

texteditor questions

5 posts in this topic

Okay so as you may know i'm working on a project called oPad.

This is my first propper thing in AutoIt. So bare with me.

It is a text editor.

I would just like to ask a couple of questions.

How would i do such things like.

Undo, redo.

Cut, Copy and Paste.

How would i go about doing these?

Thankyou.


[right] [/right]

Share this post


Link to post
Share on other sites



It can be as simple as just one undo or redo using the EM_UNDO message. If you want it to undo more things you need to subclass the edit class and manage things as maybe a linked list if applicable or just an array of strings.

Share this post


Link to post
Share on other sites

Is this in the HelpFile that i could read up upon?

Thanks


[right] [/right]

Share this post


Link to post
Share on other sites

It's related to EditConstants.au3 but it's all is taken or build according Microsoft's controls classes and what notification or styles they have so it's better to go and read it there on MSDN, of course you'll see a short good explanation in AutoIt's help file. It's under "GUI Control Styles" in the help file, just navigate a little bit down and you'll see the styles of the edit control.

Sub classing the control is available by using a few _WinAPI_* functions to receive the class's message handler and assign a new one to it using _WinAPI_SetWindowLong($hEdit, $GWL_WNDPROC, DllCallbackGetPtr($RegistredCallbackFunc))

Take a look in the help file for examples about these functions.

Share this post


Link to post
Share on other sites

Okaii, i have sorted the undo.

But i still have things like,

Redo, Select All, cut, copy, paste. Etc to do too.

Any more help?

Thanks.


[right] [/right]

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  
Followers 0