flat assembler
Message board for the users of flat assembler.

Index > Windows > Text editor template

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
Some times ago I began to wrote text editor.
But I give up because of my main work and creative trip. Smile
Now I have a long rest-time and saw 'zibu' from vbVeryBeginner.
I'm wake up!

It's just a 'text editor template' for educational purposes but who knows...
It maybe usefull... Confused

Look at the and of thread.


Last edited by iklin on 10 Jan 2005, 17:37; edited 2 times in total
Post 27 Dec 2004, 15:37
View user's profile Send private message ICQ Number Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
i would suggest you to read the iczeliion tutorial 33 34 and 35
it covers a lot actually from start to color syntax :-p

btw, sorry for waking u up :-p
Post 27 Dec 2004, 20:48
View user's profile Send private message Visit poster's website Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
Yes, I read it yet Smile but... Sad
Post 28 Dec 2004, 10:22
View user's profile Send private message ICQ Number Reply with quote
sina



Joined: 18 Aug 2003
Posts: 132
Location: istanbul turkey
sina
when i try wordwrap it did not work but the font has changed, then with clicking wordwrap 2nd time it worked
Post 29 Dec 2004, 00:02
View user's profile Send private message ICQ Number Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
Yes... This is the problem that I can't solve right now. I have to think hard. This is cause I ask somebody who can tell me where I'm wrong.
P.S.
Bad English, I'm hurry Sad
Post 29 Dec 2004, 06:13
View user's profile Send private message ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
Sorry, I tryed, but its hard to read your code - better overcommented than undercommented Very Happy
Code:
        invoke  GetWindowText, [hedit], [.mem], [.ln]
        invoke  DestroyWindow, [hedit]
    

What do you gain with that?
Code:
;invoke  SendMessage, [hedit], WM_SETFONT, [hfont], TRUE    

maybe you SHOULDN't change font? Did the value of hfont get lost somewhere?


P.S. The font-change bug happens only once! Try changing the font yourself (I put Courier New for ecample) then hit F8 or select wordwrap or sth...
look! the Courier remains and the wordwrap toggles Very Happy
But you notice one glitch - the selector is put in the beginning. Oh well its complicated - steps follow:
1) type sth like "Mfagker kjbg akr bkeregr kh beakhg over the edge..."
IF you have NOT selected the font yourself!!! then the [hfont] has not been set yet so some strange font is selected like 0 or I don't know Razz
2) Hit F8 (or Options->WordWrap) now from the previous code I assume that the windows is destroyed and a new one is created with this text so if you have selected a new font - you'll have it, but otherwise it will change to some freaky default font. The first time Wordwrap don't work, but every other time it toggles WITHOUT affecting the font.

Code:
hfont         dd ?    

Declare something?
Post 29 Dec 2004, 09:33
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
Ok, I checked a little closer (OllyDbg) and I realized that the same loop is ran twice with difference in actions taken:
Code:
        cmp     [wordwraped], 0
        je      .wrap
        mov     [wordwraped], 0
        mov     ebx, WS_VISIBLE + WS_CHILD + ES_LEFT + ES_NOHIDESEL + ES_MULTILINE + \
                WS_VSCROLL + ES_AUTOVSCROLL
        jmp     .no_wrap
.wrap:
        mov     [wordwraped], 1
        mov     ebx, WS_VISIBLE + WS_CHILD + ES_LEFT + ES_NOHIDESEL + ES_MULTILINE + \
                WS_VSCROLL + ES_AUTOVSCROLL + WS_HSCROLL + ES_AUTOHSCROLL
.no_wrap:     

If you set the wordwraped variable to ONE at the beginning you're set. I couldn't test it because I had trouble compiling it Sad
I think THIS code can also deal with your problem:
Code:
        mov     ebx, WS_VISIBLE + WS_CHILD + ES_LEFT + ES_NOHIDESEL + ES_MULTILINE + \
                WS_VSCROLL + ES_AUTOVSCROLL
        cmp     [wordwraped], 0
        mov     [wordwraped], 1 ;mov does not change flags
        jne     .no_wrap
        mov     [wordwraped], 1
        mov     ebx, WS_VISIBLE + WS_CHILD + ES_LEFT + ES_NOHIDESEL + ES_MULTILINE + \
                WS_VSCROLL + ES_AUTOVSCROLL + WS_HSCROLL + ES_AUTOHSCROLL
.no_wrap:    

Again sorry - I weren't able to compile your code (seems to be with Fresh roots) and I could only change running code on-the-fly with OllyDbg.

_________________
My updated idol Very Happy http://www.agner.org/optimize/
Post 29 Dec 2004, 10:33
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
Now thanx. I look into your suggestions later Smile now I so tired... Sad
Fresh: I use only globals.inc and display.inc. I find it useable in some cases.
I look into iszelion's tuts and now 'find text' works almost good. Smile
Post 29 Dec 2004, 18:11
View user's profile Send private message ICQ Number Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
btw, iklin, i think they should run a notepad replacement competition :p
i guess it would be a really nice experience to see those OS coders to do something like 512kb notepad :-p

anyway, what is ur notepad name? -? iklin notepad? <- no good :-p Very Happy
Post 29 Dec 2004, 21:33
View user's profile Send private message Visit poster's website Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
2 vbVeryBeginner:

Notepad name? It's not so important. Just now - "Text editor template" Smile
512kb notepad? It'll be funny if somebody could implement that Smile
Post 30 Dec 2004, 07:29
View user's profile Send private message ICQ Number Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
lol, forgetting a "dot" make a big difference :p
how bout 5.12 kb notepad ;}

sure, they could code a 512 bytes notepad... em.. well, let see :-p
Post 30 Dec 2004, 13:42
View user's profile Send private message Visit poster's website Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
Some progress in Text Editor Template...
I'm just learning and train my brain Smile
- Find, Replace, Goto line, Selection bar, (Un)Comment Smile
- no Word wrap Sad
- no cleanup, no optimization in source Sad

Any remarks are welcome!

But I can't upload it! Sad
It's me or forum?
Post 06 Jan 2005, 19:40
View user's profile Send private message ICQ Number Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
New version with some new features added:
Drag'n'Drop, Insert File, CmdLine, New Instance...

Any remarks are welcome!


Description: Text editor template 0.0.2
Download
Filename: tet002.rar
Filesize: 21.23 KB
Downloaded: 210 Time(s)

Post 07 Jan 2005, 16:58
View user's profile Send private message ICQ Number Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
hi iklin,
i downloaded ur TET :p and they look nice.
i preffer ur comment style, where one Ctrl + T to handle the comment and uncomment feature, maybe zibu should have somthing like that too :p

and the way ur TET history is nice, maybe i should have something like that also :p

btw, i tried ur TET with a 500 MB files opened and it crashes, the good thing is, ur TET process could be killed using the process viewer. and one more good thing is, i tried that with FASMW as well, and u see, it crashes the WHOLE system, unable to shutdown the process, and eventually have to use the RESET button on pc casing :p

you could try it urself, but plez save all ur files first :p

* actually this is retype, coz FASMW crashed my whole system :p
Post 07 Jan 2005, 17:26
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
vbVeryBeginner, are you using Win9x?
Post 07 Jan 2005, 17:29
View user's profile Send private message Visit poster's website Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
yup, loyal win95 customer Smile
Post 07 Jan 2005, 17:48
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Ah, I though you would be using some 9x version since you could crash the OS with a usermode app Smile
Post 07 Jan 2005, 18:06
View user's profile Send private message Visit poster's website Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin
vbVeryBeginner wrote:
btw, i tried ur TET with a 500 MB files opened and it crashes

Shocked OK I'll try it. But for what you need such big files?!
vbVeryBeginner wrote:
i tried that with FASMW as well, and u see, it crashes the WHOLE system

You try to compile with fasmw? I use Far and console fasm.
And you better use Win98 SE. It is more stable than Win95 and not so diferent. Untill 6 months ago I use P-100 with Win98SE and was happy. Now I'm using Celeron-2k with Win2k and still happy. Smile
Post 07 Jan 2005, 21:25
View user's profile Send private message ICQ Number Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
Strange I haven't been able to crash FASMW on any system yet
2K/XP 98SE have been dealing with all kinds of codes - buggy and long and I'm even opening data-files with it. Its a LOT faster than notepad for example...
I even tried compiling these HUGE examples, which took about 20sec to 6min...
Post 07 Jan 2005, 22:24
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
no, just wanna see how the FASMW handle big files like 500MB,

i actually use console fasm to assemble

btw, madis, i didn't use fasmw to open code, i use it to open a 500 MB binary files :p

yup, fodder, we are not allowed to do weird thing with win95 :p, microsoft said that :p
Post 08 Jan 2005, 05:00
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.