Re: Win32lib question RE: edit controls

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Wed, 15 Mar 2000 09:49:45 -0500, SR Williamson wrote:

>I'm trying to rebuild a program in Eu that I wrote in BCPPB. It's a small
>HTML formatting pad for people that frequently use message boards.
>Basically, a user types text into an edit control, highlights a section,
>pushes a button, and the program inserts HTML tags at the beginning and the=

>end of the highlighted section.
>
>In BCPPB, the program was trivial because the Builder Edit Control has a
>SelectAll method. I can't seem to find an equivalent procedure in Win32lib,=

>or anywhere else in Eu for that matter, and I can't figure out a way to
>write the program without it.
>
>Any suggestions?
>Sherm

Hi Sherm,

To select all text in an Edit Control, you will need to send an EM_SETSEL
message to the control.

Win32Lib provides 'sendMessage( control, command, wParam, lParam )'.

In this case, wParam is the starting position (nStart) and lParam is the
ending position (nEnd). If the nStart parameter is 0 and the nEnd parameter
is =961, all the text in the edit control is selected. If nStart is =961, an=
y
current selection is removed. The caret is placed at the end of the
selection indicated by the greater of the two values nEnd and nStart.

You don't need to define EM_SETSEL because it is already defined in
Win32Lib.

Hope this helps.  (I'm not sure if this is what you are asking but there
are many other Edit control messages that should help you do what you want.)=


-- Brian

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu