View Full Version: Dragon Text Editor

C++ Learning Community > C++ Creations > Dragon Text Editor


Title: Dragon Text Editor


Dragon - August 10, 2003 08:52 PM (GMT)
Version 1.4 is now available for download! It's the best version yet.

Major Changes

* Added more buttons to toolbar
* Added edit options
* Focus is given to the edit on startup

Download here:
http://mercuria.no-ip.org/dragonproductions

dr voodoo - August 10, 2003 09:23 PM (GMT)
Nice althought you should make the window resizable

Kylevision - August 11, 2003 01:16 AM (GMT)
Very cool

Kylevision - August 11, 2003 01:18 AM (GMT)
and also, thats exactly the type of thing I would like to create when I get better with win32

Dragon - August 11, 2003 03:12 AM (GMT)
QUOTE
Nice althought you should make the window resizable


That would be very easy to implement. However, as I was making the program I left it out. :)

Dragon - August 11, 2003 11:57 PM (GMT)
Oops! There is a small bug in the program. When you open or save a file, the save/open box both have "Save" as the box caption. The fixed version should be ready by tomorrow at the latest.

Dragon - August 13, 2003 03:29 AM (GMT)
Version 1.1 is available for download now. :)

Sam Fisher vs Solid Snake - August 13, 2003 04:18 AM (GMT)
i am not an expieranced c++ person, but can somebody direct me in the way of text editors or gamemakers stuff? i mean where do you people learn this?

Dragon - August 13, 2003 04:24 AM (GMT)
Win32 programming in C/C++ is different from standard C/C++ programming. You can find tutorials and stuff if you search around on Google (for "Win32 programming in C++", etc.). I will also recommend theForger's Win32 tutorials, which are very good (http://winprog.org/tutorial).

Sam Fisher vs Solid Snake - August 13, 2003 04:45 AM (GMT)
i know win32, in fact i know a good bit of it

Sam Fisher vs Solid Snake - August 13, 2003 04:52 AM (GMT)
if you could could i plz have thesrc code for this basic text editor

Dragon - August 13, 2003 05:00 AM (GMT)
Yes, I will PM you with the source by tomorrow (I can't right now because I'm not on my computer).

However, the source isn't very commented because I didn't intend to release the source along with it.

Also, what compiler do you use?

Sam Fisher vs Solid Snake - August 13, 2003 05:01 AM (GMT)
VC++ .net Standard 2003, and thank you so much kind sir, and its ok if it isnt commented THANK YOU :o :o

Dragon - August 13, 2003 05:06 AM (GMT)
I'll try to get it commented (it's not that hard, I just didn't feel like it. :D). Because I don't use the same compiler as you, I don't know if everything will work correctly. I'll give you the source for the three files in the project (main.c, main.h, and resource.rc) and you can copy and paste them into files on your computer. Then add the files to a project and compile as GUI. It should work out, though.

Sam Fisher vs Solid Snake - August 13, 2003 05:10 AM (GMT)
ok, cool thx, thank you

Sam Fisher vs Solid Snake - August 14, 2003 12:28 AM (GMT)
ummm have you finished, commenting it?

Dragon - August 14, 2003 12:38 AM (GMT)
Don't worry, it'll be ready...soon. :D

Dragon - August 14, 2003 11:56 PM (GMT)
Okay, v1.2 is now ready for download.

Sam Fisher vs Solid Snake - August 15, 2003 03:01 AM (GMT)
nice, keep up the good work, try making a Microsoft word/notepad mix, it would be sweet

Dragon - August 15, 2003 03:19 AM (GMT)
These are my plans:

To do list

* Multi-file interface
* Re-sizing the window
* Edit options (font, find, etc.)
* Settings

I might come up with more things, but those are the main ones.

FHCandyman - August 15, 2003 01:32 PM (GMT)
very cool dragon, hope you can make those new features work well because they sound really helpful. Nice work, you get the Candymans approval B) :lol:

Dragon - August 15, 2003 07:47 PM (GMT)
I already have v1.3 ready. I just haven't uploaded it yet. :)

I added a tool bar. It's the same tool bar found in theForger's API tutorials. I didn't feel I had to change anything. :)

FHCandyman - August 15, 2003 08:02 PM (GMT)
<chants> upload, upload, upload! :D

Dragon - August 15, 2003 08:04 PM (GMT)
I decided to wait a little longer. :)

The reason is that I didn't want to release a version with just one update. I'll add the window re-sizing ability and then upload it. Because that will be easy to do, I'll probably have it done later today. :)

Dragon - August 17, 2003 03:23 AM (GMT)
Okay, I just uploaded v1.3! Check the first post for the major changes.

QUOTE
Nice althought you should make the window resizable


Now that's a reality!

Updated To Do List

1. Edit options
2. Settings
3. Multi-file interface

The items above are listed in order or priority (1. - Highest, 2. - Lowest).

Dragon - August 21, 2003 10:51 PM (GMT)
Version 1.4 is available for download. The next version might take a little longer to be released, but this isn't certain.

To Do List

* Change font
* Back-up copies
* Multi-document interface

Stuy GM - August 23, 2003 11:01 AM (GMT)
heres a challenge (i think =\) in MSWord, if your comp crashes, u can get it recovered, could u do that maybe?

Shadow of the Moon - August 23, 2003 12:14 PM (GMT)
you could just write to a document called rescue.dat sporodically and delete it when the program closes. Then check for it when your program starts up.

Dragon - August 23, 2003 07:46 PM (GMT)
QUOTE
heres a challenge (i think =\) in MSWord, if your comp crashes, u can get it recovered, could u do that maybe?


I'm not sure how Microsoft Word does it, but there are lots of ways to do that. The easiest, I think, would be to create backups of files in another directory. This way the user will be able to select from the backups and open it.

Stuy GM - September 3, 2003 10:06 AM (GMT)
QUOTE (Dragon @ Aug 23 2003, 07:46 PM)
QUOTE
heres a challenge (i think =\) in MSWord, if your comp crashes, u can get it recovered, could u do that maybe?


I'm not sure how Microsoft Word does it, but there are lots of ways to do that. The easiest, I think, would be to create backups of files in another directory. This way the user will be able to select from the backups and open it.

I think this would be the best way Dragon:
Shadow of the Moon wrote:
QUOTE
you could just write to a document called rescue.dat sporodically and delete it when the program closes. Then check for it when your program starts up.

Dragon - September 6, 2003 03:44 AM (GMT)
I might add it when I decide to work on the program again.

My current project is BCCCT, which you can find in the works in progress forum. It's a program that generates a batch file which will compile your source(s) with the Borland C++ command-line compiler.

Dragon - October 9, 2003 04:00 AM (GMT)
I'm planning on releasing a new version of Dragon Text Editor sometime soon.

New Features
  • Save settings
  • Flat toolbar

Thanks to Jossh for telling me how to create flat toolbars.

Jossh - October 9, 2003 10:29 AM (GMT)
Sweet, cant wait :D

that person - October 14, 2003 05:44 PM (GMT)
I haven't looked at the text editor yet, but you have a nice site. And your encryptor is cool too (except maybe for the .ico :)

Dragon - October 16, 2003 01:45 AM (GMT)
QUOTE
I haven't looked at the text editor yet, but you have a nice site. And your encryptor is cool too (except maybe for the .ico :)


Thanks. :D

My current projects: (listed in order of priority)

1. IDE for the Borland C++ Compiler
2. Gladiator (game)
3. Dragon Text Editor

ladyLovelace - April 15, 2004 04:45 PM (GMT)
Hey, I realise this post is pretty much dead but I've decided to resurrect due to the urgency of my situation. :wacko: I have a big final year project due in college and I'm kind of screwed. Basically it's a C++ editor much like yours Dragon (well at least what I'm aspiring towards), which implements voice recognition for keywords in C++ and outputs them e.g saying while will output a while loop.....anyway my problem is with the editor. We've the buttons but aren't sure how to make them work e.g open file, save file, etc. :unsure: (sidenote:if this was java it would be easy).
I went to the site you mentioned http://winprog.org/tutorial/ but it's in C and I think the two languages clash e.g OPENFILENAME doesn't appear to be recognized. Can you give me an idea of what I should do?!

Thanks :D

C-Man - April 16, 2004 09:01 AM (GMT)
Get platform sdk and try fishing for some functons.OPENFILENAME i think it's
GetOpenFileName it's declared in Commdlg.h, included in Windows.h.

ladyLovelace - April 16, 2004 12:17 PM (GMT)
I entered the struct for OPENFILENAME even though I had already referenced <windows.h> so that's no longer giving an error but now it's not recognising any of these commands OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT which is for the save function.

I'm also getting another error I can't fix, which is:

error C2440: '=' : cannot convert from 'void *' to 'char *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast

It's in relatiopn to this line: pszFileText = GlobalAlloc(GPTR, dwFileSize + 1);
pszFileText is declared as: LPCTSTR pszFileName
dwFileSize is declared as: DWORD dwFileSize

:unsure:

myork - April 16, 2004 12:33 PM (GMT)
QUOTE
pszFileText = GlobalAlloc(GPTR, dwFileSize + 1);


This is because the function 'GlobalAlloc()' is returning an object of 'void*'. Which you are trying to assign to an object that has a type of 'char*'. What you need to do is cast result of 'GlobalAlloc()' to the correct type.

In C:
CODE
pszFileText = (char*)GlobalAlloc(GPTR, dwFileSize + 1);



In C++:
CODE
pszFileText = reinterpret_cast<char*>(GlobalAlloc(GPTR, dwFileSize + 1));

ladyLovelace - April 16, 2004 01:21 PM (GMT)
Thanks for that it fixed at least one of my errors. :)




* Hosted for free by InvisionFree