Help on the Edit Control

Help on the Edit Control

Post by Heriberto Betancourt Diest » Thu, 20 Apr 2000 04:00:00



Hello everyone.

I need to use a small editor (under the Win32 API) in my school assignment,
but the "edit" control is too simple to be useful. I need (at least) to add
some functions, like inserting spaces at the end of some lines (to make the
control movement work correctly, that is, when going up, keeping in the same
column) or making something like "auto indent".

I know I can "subclassify" the edit class, that is, I can redefine the
WinProc
of the control, and process the messages by myself, BUT I can't find some
things like:
1. The position of the caret into the text (not only retrieving the
position,
but also changing the position)
2. The cursor movement operations

I really need it FAST. would appreciate if someone knows where could I find
a
tutorial, or source code, or ANYTHING about it. I've read the "Programming
Windows" (5th edition) by Charles Petzold, but there are only two paragraphs
about "edit" windows.

Thank you very much.

 
 
 

Help on the Edit Control

Post by Klaus-Werner Konra » Fri, 21 Apr 2000 04:00:00




Quote:> Hello everyone.

> I need to use a small editor (under the Win32 API) in my school
assignment,
> but the "edit" control is too simple to be useful. I need (at least) to
add
> some functions, like inserting spaces at the end of some lines (to make
the
> control movement work correctly, that is, when going up, keeping in the
same
> column) or making something like "auto indent".

See the documentation to EM_REPLACESEL

Quote:> I know I can "subclassify" the edit class, that is, I can redefine the
> WinProc
> of the control, and process the messages by myself, BUT I can't find some
> things like:
> 1. The position of the caret into the text (not only retrieving the
> position,

See the documentation to EM_GETSEL

Quote:> but also changing the position)

See the documentation to EM_SETSEL

Quote:> 2. The cursor movement operations

> I really need it FAST. would appreciate if someone knows where could I
find
> a
> tutorial, or source code, or ANYTHING about it. I've read the "Programming
> Windows" (5th edition) by Charles Petzold, but there are only two
paragraphs
> about "edit" windows.

No, there are about 5 pages of information about edit controls !

IMHO you need to use a rich edit control ...

HTH
--
Klaus-Werner Konrad
(ohne pfiffigen Spruch)

 
 
 

1. right alligned edit singel line edit control under windows 95

Hi, I use a single line edit control with automatic H scroll enabled and
right alligned text under Windows NT. This works just perfekt. When I do
the same thing under Windows 95 the right allignment doesn't work
anymore. The documentation says that right allignement just works with
multiline edit controls. Unfortunately i can't use multiline edit
controls because they are not able to do the automatic H scroll.
Is there any solution to have a single line edit control with right
alligned text under Windows 95?

Thanks Pascal

2. Partition Table Absent Under OS/2?

3. use Notepad or "edit" control to implement "edit as text"?

4. C++ compiler for IRIX 5.2

5. edit control for binary/hex editing

6. mount point in bdf

7. How to access the edit menu of edit control ?

8. Real-time, Embedded Systems Developers Available

9. Adding text to an Edit Control and RichEdit Control

10. Urgent help required. Strange edit control behaviour

11. Valid controls for Rich Edit Control

12. A dynamically created edit control in a List control.

13. edit control help