I'm back, I had a major pc melt down on 02-28-2003
and I lost a ton of stuff.

It's not that I didn't have the means to back everything
up I just got lazy and thought copying critical files
from one drive to the other was enough.

Since then I have replaced the two hard drives on my
400MHz pc and have built a new 2.80GHz with 1GB of ram,
two hard drives, and XP home/Pro pc and have got back
or rewrote about 90% of my files/pgms.

Anyhow right at the time of the melt down I was ready to
post my RichEdit control for a test. That was one of the
programs that I had to rewrite, but I think the program
was better the first time.

I'm rewriting AsmEdit using the RichEdit44.dll control the attachment
below is step 1.

The instructions for vert and horz mouse select scroll is in the text file.

There is one thing that might need explaining.

Constrain cursor to text. After you select the option you
will need to use the left mouse button to set the x position.

Example dd ah
Example dd bh
Example dd ch
Example dd dh
Example dd eh

When you add the zero before the ah and then hit the down arrow
the cursor will be before the b and not after the b.

Column block is not available yet.

I'm having some trouble using flat Toolbars with text only
under XP and using the .xml application manifest, I need to
learn more about XP.

1. Unpack the AsmEdit.zip to some directory.
2. Run the Setup.exe program. (If you don't run it you will be prompted to do so)
3. Open the Pgm02.asm file in the list view.
4. press the Build button on the toolbar.
5. Press the Run button on the toolbar.

I forgot to mention that Pgm02.asm has 4 errors to test out the build error
highlighting, but they are easy to fix.

If every thing loaded ok the program should execute.

Let me know how it works.



RichEdit44.dll control test.

Previous downloads (354)

Go to my last post for the update.

Posted on 2003-04-07 21:21:45 by Ewayne
Hi Ewayne

Very nice.
One thing I noticed. On long text lines, selection by mouse is very slow. You should use successive aproximation to calculate character position.

Posted on 2003-04-08 02:00:43 by KetilO
Writing a replacement for RichEdit?
Posted on 2003-04-08 02:56:03 by f0dder
Hi Ewayne

You forgot to change the original filename.

Posted on 2003-04-08 03:57:34 by KetilO
Hi KetilO,

I have not used the Version in a resource file very much
and I had a problem so I copied yours over and was replacing
it line by line with mine to see where the problem was and it
looks like I forgot to replace a line.


Posted on 2003-04-08 09:23:39 by Ewayne
GPF (read error) on NT4SP6 on CTRL+F4 (go to). maybe EBX not preserved ?
Posted on 2003-04-08 09:44:46 by TBD
Hi Ewayne

Your horizontal scrollbar size calculations fails on non monospaced fonts and if the line contains tabs.

Posted on 2003-04-08 13:02:07 by KetilO
The line numbers on the left appear to be cut-off and it had some trouble drawing one of the labels. Tested it in winXP sp1.

Posted on 2003-04-08 13:29:13 by Thomas
To f0dder:

Writing a replacement for RichEdit?

If I can get it to work right I will replace M$'s RichEdit control
in AsmEdit with RichEdit44.

Posted on 2003-04-10 16:12:43 by Ewayne
But if you're doing all this work, would it have been better to write an entirely new edit control? I think I've heard quite some people moan and bitch at RichEdit for being quirky and limited :)
Posted on 2003-04-10 16:16:00 by f0dder
To Thomas:

You have the option of removing the leading zeros and or changing
the font and size for line numbers.

I looks like the label problem might have something to do with
the underbar, because I key on the underbar for a posible API,
I'll look into it.


Posted on 2003-04-10 16:19:41 by Ewayne

I can not duplicate your GPF.

Try downloading the updater RichEdit44Test.zip from
the first post on this thread and see if you still have
the same problem.


Posted on 2003-04-10 16:24:40 by Ewayne
To KetilO:

I can not seem to find a problem selecting long lines with the mouse.
How long of a line are you talking about?

I have done a lot of work on the horizontal scrollbar calulations, it should
be ok now for non fixed width fonts and tabstops.

I still have not found a good way to scroll the horizontal scrollbar using
the mouse to select a line if the line is longer then the edit width when
using non fixed width fonts, it's close.

You can go to the first post on this thread for an update.


Posted on 2003-04-10 16:44:32 by Ewayne
To f0dder:

Thats what I'm trying to do if I don't go insane first.

Posted on 2003-04-10 16:52:20 by Ewayne
To f0dder:

I fixed your label display bug.

You can download an update from the first post on this thread.


Posted on 2003-04-10 20:34:42 by Ewayne
Hi Ewayne,

The Integer division by zero exception had occured on WinXP SP1 :)
Posted on 2003-04-10 22:30:13 by Bi_Dark
To Bi_Dark:

I will need more information.
What were you doing?


Posted on 2003-04-11 00:05:11 by Ewayne
RichEdit44:v1.0.04 (10.04.2003)
Asm File: \masm32\example1\generic\generic.asm

1. GoTo working (no more GPF)

2. bug? for line with right arrow icon
2.1. line hilite (shift+1,2,3,4)
2.2. scroll using the scroll bar
2.3. hilite disappear

3. No HighLite use B&W not working.

4. it is possible to collapse procedures ?

5. right arrow icon for DispatchMessage (bug or feature) ?
Posted on 2003-04-11 00:35:25 by TBD
Hi Ewayne

Division by zero on startup (XP SP1). Probably size calculations before font width / height is set.

Slow selection by mouse on long lines:

If you look at GetCpFromXp you will see that it uses a linear try and fail method. This will be slow if you select a few characters (by mouse) at the end of a long line.

The best method I can come up with is a successive aproximation method. The aproximation must return last known smaller value because the string might not be balanced (non monospaced font / tabs). From last known smaller value you can use linear try and fail method to find exact character position.

Posted on 2003-04-11 02:40:05 by KetilO

Nothing but double click the exe. Nothing had show except an error window.:)

"The exception Integer division by zero.
(0xC00000094) occured in the application at location 0x10009BE9"
Posted on 2003-04-11 07:16:54 by Bi_Dark