Jump to content

highlighted text in edit control


qmark
 Share

Recommended Posts

I'm probbally to stupid or "newpid" because it doesn't work

could your check my code please?

#include <GUIConstants.au3>

$start_char = 1

$end_char = 100

$EM_SETSEL = 0x00B1

GUICreate("Address",600,400) ; will create a dialog box that when displayed is centered

$buttonX = GuiCtrlCreateButton ("save",190,10,80,20)

$buttonH = GuiCtrlCreateButton ("hilight",0,10,80,20)

$myedit=GUICtrlCreateEdit ("", 0,32,600,450,$ES_AUTOVSCROLL+$WS_VSCROLL)

$file = FileOpen("C:\todo.txt", 0)

$chars = FileRead($file,99999)

GUISetState ()

GUICtrlSetData ($myedit, $chars ,1)

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Select

case $msg = $buttonH

GUICtrlSendMsg($myedit, $EM_SETSEL, $start_char, $end_char)

MsgBox(0,"", "ok",2)

EndSelect

Wend

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...