NO

Author Topic: Writing my own RichEdit Editor  (Read 2620 times)

Grincheux

  • Guest
Writing my own RichEdit Editor
« on: November 01, 2019, 06:42:59 PM »
I decided to write my own. It is a hard project. The following options are written :

  • Open
  • Protect
  • Import
  • Save
  • Save as
  • Close
  • Close all
  • Undo
  • Redo
  • Copy
  • Cut
  • Paste
  • Goto
  • Select all
  • Find
  • Find Next
  • Replace
  • Quit

The file myEditor.ini is used to configure the program. It contains :

Code: [Select]
[Installed Languages]
1=French.lng
2=English.lng

[Languages]
French=1
English=2

[Language]
Current=French

[Recents Files]
1=
2=
3=
4=
5=
myEditor/file

It "speaks" French and English. I need other languages to test.

If you want to help me unzip the myEdit.7z and create a file like the English.lng located into the Languages folder.

A typical language file :

Code: [Select]
[Messages]
1=Error
2=Warning
3=Question
4=Information

101=Cannot initialize SQLite
102=Cannot initialize GFLSDK
103=Cannot Load File
104=Cannot Save File
105=Cannot Register Window
106=Cannot Register Child Window
107=Cannot create main window
108=Text not found
109=MDI Child creation failed
110=Cannot create MDI client
111=Do you really want to leave us?
112=myEditor for Windows
113=%s
114=Welcome
115=[Untitled]
116=Save current changes in %s?
117=The file %s has been modified\ndo you want to save it?
118=Save & Close

119=C Source files (*.c)|*.c|
120=C Include files (*.h)|*.h|
121=Resources Source files (*.rc)|*.rc|
122=Assembler Source files (*.asm)|*.asm|
123=Assembler Include files (*.inc)|*.inc|
124=Profile files (*.ini)|*.ini|
125=Languages Files (*.lng)|*.lng|
126=Csv Files (*.csv)|*.csv|
127=Text Files (*.txt)|*.txt|
128=All Files (*.*)|*.*|

129=
130=
131=
132=
133=
134=
135=
136=
137=
138=
139=
140=
141=
142=
143=
144=
145=
146=
147=
148=
149=
150=
151=
152=
153=
154=
155=
156=
157=
158=
159=
160=
161=
162=
163=
164=
165=
166=
167=
168=
169=
170=
171=
172=
173=
174=
175=
176=
177=
178=
179=
180=
181=
182=
183=
184=
185=
186=
187=
188=
189=
190=
191=
192=
193=
194=
195=
196=
197=
198=
199=
200=
201=
202=
203=
204=
205=
206=
207=
208=
209=
210=
211=
212=
213=
214=
215=
216=

[Menus]
3001=&File
3002=&Edit
3003=&Search
3004=&Project
3005=&Window
3006=&Help

4001=&New Ctrl+N
4002=&Open... Ctrl+O
4003=Protect... Ctrl+P
4004=Import... Ctrl+I
4005=Close Ctrl+W
4006=Close All Ctrl+Shift+W
4007=&Save Ctrl+S
4008=Save &As... Ctrl+Shift+S
4009=Save All Ctrl+Alt+S
4010=1
4011=2
4012=3
4013=4
4014=5
4015=E&xit Ctrl+Q
4016=&Undo Ctrl+Z
4017=Redo Ctrl+Y
4018=Cu&t Ctrl+X
4019=&Copy Ctrl+C
4020=&Paste Ctrl+V
4021=De&lete Del
4022=&Select All Ctrl+A
4023=&Goto... Ctrl+G
4024=&Find... Ctrl+F
4025=Find &Next F3
4026=&Replace... Ctrl+R
4027=Count
4028=Compile
4029=&Build Ctrl+B
4030=Rebuild All F7
4031=Run F5
4032=&Cascade
4033=Tile &Horizontal
4034=Tile &Vertical
4035=Arrange &Icons
4036=&Help
4037=&About myEditor...
« Last Edit: November 02, 2019, 07:13:12 AM by Grincheux »

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: Writing my own RichEdit Editor
« Reply #1 on: November 06, 2019, 10:10:30 PM »
Sorry...

Quote
Download not available
This file can not be downloaded because there was a problem with the upload. If possible, contact the person uploading the file to ask them to upload it again.

Grincheux

  • Guest
Re: Writing my own RichEdit Editor
« Reply #2 on: December 01, 2019, 02:36:28 PM »
Sorry, but I had a lot of problems I did not made the update.
Here is it now : http://www.mediafire.com/file/xzg32l9py3h8y4t/myEditor.7z/file Updated on 2019/12/06

Updated on 2019/12/06
-Corrected a bug when duplicating the last line.
-Replaced system time with local time when inserting date and time.
-When removing spaces at end of line all was removed.
-Text was not translated for "insert text" dialog box.
-Bad translation for "Replace" dialog box.
-Corrected a bug in Save All

Updated on 2019/12/05
- Rewritten Find/Replace
- Corrected a bug when leaving the program
- Adding colors for background and text

Updated on 2019/12/03
- Corrected the problem with the context menu
- Corrected the mark when a file is modified
- Corrected a problem with File Save and File Save As that did not display the filename.
« Last Edit: December 07, 2019, 04:10:38 AM by Grincheux »

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: Writing my own RichEdit Editor
« Reply #3 on: December 25, 2019, 05:08:47 PM »
I had written a long list of little issues here, when I decided to test the Shutdown icon. Hooray, this icon works! No warning, though, and even clicking "Cancel" when MS Word asked me if I wanted to save changes didn't stop the process of shutting down the whole machine.

I had some sources open, but fortunately my own RichEdit editor (RichMasm) is prepared for sudden blackouts and rogue applications that shut down the machine without any warning, so I could recover these sources.

Warning to everybody: DO NOT USE Grincheux' editor.

Grincheux

  • Guest
Re: Writing my own RichEdit Editor
« Reply #4 on: December 26, 2019, 11:01:48 AM »
In France we drive on the right, like in many countries.
On day of May, this year, the car that was coming in front of me was also on the right !
Imagine, when I was pressing the break pedal, a messagebox asking me "Are you sure?"
The time spent for answering and I was dead!
I made this option in this idea in mind.
I know that loosing a lot of work make you hangry. I am sorry.
I will add a MessageBox. This is my contribution for 2020.  >:( >:( >:( >:(
I can't add it now because I am adding the project menu and it will be strange to have an option that does nothing.
The project menu will be a RadAsm like project. Like the one joint here.
The compiler will be define into an other file, joint too.

SORRY JJ2007

Code: [Select]
File "English.lng"

[Messages.Questions]
0=Do you really want to leave me?
1=Do you have to save the changes in %s?
2=Do you really want to loose your work?

File "myEditor.ini"

[Main Section]
Font Name=Courier New
Background Color=10092543
Texte Color=0
JJ2007=1

BOOL SystemShutdown(void)
{
   HANDLE            _hToken ;
   TOKEN_PRIVILEGES   _Tkp ;

   if(GetPrivateProfileInt("Main Section","JJ2007",0,szProfileFile))
      if(Question(2) != IDYES)
         return (FALSE) ;
« Last Edit: December 26, 2019, 11:27:59 AM by Grincheux »

Grincheux

  • Guest
Re: Writing my own RichEdit Editor
« Reply #5 on: December 26, 2019, 11:49:17 PM »
I have made a folder where you can pick the files of the last (unofficial) version.
Changes for JJ2007 done.
Don't use the Project/Open menu it is not finished.
Many changes are coming soon.


http://www.mediafire.com/folder/4c401gtxexhzk/PellesC
« Last Edit: December 26, 2019, 11:52:22 PM by Grincheux »