I'm looking to write a very very simple text editing program. Its merely an editable textbox(no rich text) and a menu with open/save/exit.Something like a stripped down notepad. Is there any code someone is willing to share to help get me started?
:bg
Yes, its in the MASM32 TOOLS directory, its called "tview" and builds at a disk hogging 3072 bytes.
Quote from: hutch-- on September 13, 2009, 12:11:27 AM
:bg
Yes, its in the MASM32 TOOLS directory, its called "tview" and builds at a disk hogging 3072 bytes.
Didn't see that one...its a good start...it only shows an editable text box, but not how to save such a file. Do you have an example of how to open and save a standard ANSI text file?
Thnx for the speedy response. :bg
Hutch wrote qeditor - a good guy to talk to
maybe he would give up the source
Quote from: dedndave on September 13, 2009, 12:54:29 AM
Hutch wrote qeditor - a good guy to talk to
maybe he would give up the source
lol...
I don't need anything that complicated, :dazzled:
I'm looking for a simple text editor that I can work off of...does nothing exist? :boohoo:
:bg
Try looking in the MASM32 example code, there is a complete text editor there that you can striip down to do what you need.
HINT: Example05\riched
Quote from: hutch-- on September 13, 2009, 01:26:19 AM
:bg
Try looking in the MASM32 example code, there is a complete text editor there that you can striip down to do what you need.
HINT: Example05\riched
Ahah...that's what I needed. Thanks a bunch. :cheekygreen: :clap:
If you are not scared of wasting a whopping 6k of disk space, try TinyRTF (http://www.masm32.com/board/index.php?action=dlattach;topic=10796.0;id=5810). Source is included - extract all, then launch tiny_rtf.exe
Iczelion's Win32 Assembly tutorial set :
Tutorial 33: RichEdit Control: Basics (http://win32assembly.online.fr/tut33.html)
Tutorial 34: RichEdit Control: More Text Operations (http://win32assembly.online.fr/tut34.html)
Tutorial 35: RichEdit Control: Syntax Hilighting (http://win32assembly.online.fr/tut35.html)
Both tiny_ide and your links to the tutorial are quite helpful. But is there something like tiny rtf editor (but simpler) for plain ansi encoded text files?
The tutorials are great! (The index seems broken though)=(
Quote from: elegem on September 13, 2009, 10:30:50 PM
But is there something like tiny rtf editor (but simpler) for plain ansi encoded text files?
You can use tiny_rtf.ex for plain text *.asm files. Just avoid using the bold, red etc buttons, or disable them in TinyDemo.rtf...
Quote from: hutch-- on September 13, 2009, 12:11:27 AM
... its called "tview" and builds at a disk hogging 3072 bytes.
Damm.. more bloatware... :P
Quote from: jj2007 on September 14, 2009, 01:17:56 PM
Quote from: elegem on September 13, 2009, 10:30:50 PM
But is there something like tiny rtf editor (but simpler) for plain ansi encoded text files?
You can use tiny_rtf.ex for plain text *.asm files. Just avoid using the bold, red etc buttons, or disable them in TinyDemo.rtf...
Ye...that's what I'm using right now...but I'm a newbie to assembly.=P
Quote from: vanjast on September 14, 2009, 07:04:31 PM
Quote from: hutch-- on September 13, 2009, 12:11:27 AM
... its called "tview" and builds at a disk hogging 3072 bytes.
Damm.. more bloatware... :P
For jollies, I looked for EDLIN.EXE on this XP system.
Directory of C:\WINDOWS\system32
08/29/2002 07:00 AM 12,642 edlin.exe
1 File(s) 12,642 bytes
C:\WINDOWS>help edlin
This command is not supported by the help utility. Try "x /?".
C:\WINDOWS>edlin /?
Starts Edlin, a line-oriented text editor.
EDLIN [drive:][path]filename [/B]
/B Ignores end-of-file (CTRL+Z) characters. Makes one wonder if it is still in Windows 7? Maybe they will
update the help facility by that point.
Cheers,
Steve N.
I found something pretty close to what I'm looking for at http://win32assembly.online.fr/tut12.html
Well actually...both 12 and 33 are fine.
My concern now is that they are rather inefficient when opening a file. According to task manager, memmory usage starts at about 1.6megabytes, but when I open a 5 kb text file, it goes up to 10megabytes...is there some way to make it more efficient?
You need to understand how task manager works, if an app calls a single function in a system DLL, it counts the entired DLL as part of its memory alculation but this is not wirthout its problems as the system DLLs are only loaded once and handle many instances concurrently. For actual memory efficiency you can drop the stack size of a 32 bit PE file with a linker setting as many apps don't need the default 1 meg stack but this will not show up in Task Manager.
Simple solution is to use the normal API calls for file IO as its the only way you can do it.
Quote from: hutch-- on September 16, 2009, 11:55:31 PM
You need to understand how task manager works, if an app calls a single function in a system DLL, it counts the entired DLL as part of its memory alculation but this is not wirthout its problems as the system DLLs are only loaded once and handle many instances concurrently. For actual memory efficiency you can drop the stack size of a 32 bit PE file with a linker setting as many apps don't need the default 1 meg stack but this will not show up in Task Manager.
Simple solution is to use the normal API calls for file IO as its the only way you can do it.
Erm...can you show how to do that with http://win32assembly.online.fr/tut12.html ...I'm still learning. :eek