-
December 7th, 2019, 03:08 AM
#1
C MDI Editor using RichEdit
Hello,
I am creating a C program that makes a MDI Editor using RichEdit.
Actually the program runs and offer many options.
I would like to improve it adding :
-Indentation
-Bookmarks
-Syntax coloring
-Compile/Build options
For the instant I am working on the indentation. My idea is to catch (MSGFILTER) the return key and to add the a number of leadind spaces or tabs that the previous line had. The problem is how to create a new line when the return key is pressed?
The program runs under Windows
Could you help me?
myEditor
Archive compressed using 7zip.
-
December 7th, 2019, 03:29 AM
#2
Re: C MDI Editor usin RichEdit
Please, attach your archive to your post.
Also check it out: Announcement: Before you post...
Victor Nijegorodov
-
December 7th, 2019, 03:30 AM
#3
Re: C MDI Editor usin RichEdit
Originally Posted by Grincheux
Hello,
I am creating a C program that makes a MDI Editor using RichEdit.
...
Is it an MFC project? Or plain Win32 one?
Victor Nijegorodov
-
December 7th, 2019, 07:56 AM
#4
Re: C MDI Editor usin RichEdit
The problem is how to create a new line when the return key is pressed?
For the current child form, the portion of the text to be displayed is shown starting from window position 0,0. A newline in the text simply means that the row position within the window is advanced and the column position set to 0. The row position is also advanced when a line is too long to be displayed using the window width etc. So when the CR key is pressed, insert a new line into the text and advance the row positon by 1 and set the column position to 0.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
December 7th, 2019, 11:30 AM
#5
Re: C MDI Editor usin RichEdit
I cannot use VS, because it is too much expensive. The compiler I use is a very good one. All my programs and source code and everyone can use it as he wants. There is no kind of licence, it is free that's all. I make the program when I have no work, I am a freelance, and programming is a passion. I saw many examples of MDI and RichEdit but they just showed Open/Close/Cut and Paste... that's poor. It was written keeping in mind that other programmers could find a complete exemple. I have to add the options described above and the possibility to compile. A kind of IDE. Don't forget it's just for fun.
Last edited by Grincheux; December 7th, 2019 at 02:09 PM.
-
December 7th, 2019, 01:03 PM
#6
Re: C MDI Editor usin RichEdit
Originally Posted by Grincheux
I cannot use, because it is too much expensive. The compiler I use is a very good one.
What is too expensive?
-
December 7th, 2019, 02:23 PM
#7
Re: C MDI Editor usin RichEdit
I know there is the community edition, but that's not a complete IDE, no resources editor. Always use of spaghetti code for programs... The advantages or disavantages of MS Compiler is not the purpose. My problem is about my MDI Editor. My model is Notepad++, but in Notepad++, it seems hard to setup a compiler. I know, there is Code Blocks, the answer is the same and I don't want to use gcc. So there was only one solution, I have to write my own IDE. Why not? The program must be able to speak many languages. The only thing I refuse to do is to include support for RTL languages.
Now I will write the indentation code. I don't want to use the PARAMFORMAT structure because I want the indentation exists even if the source code is read by an other editor. I think I must trap the WM_KEYDOWN message for VK_ENTER and/or VK_RETURN.I have not again understood how that could be done. I think that I could directly address the buffer at the next line, (2kaud explications).
-
December 8th, 2019, 05:31 AM
#8
Re: C MDI Editor using RichEdit
I know there is the community edition, but that's not a complete IDE, no resources editor.
VS2019 Community Edition is fully-featured. The only real difference between the 2019 Community Version and the Professional Edition is the licensing. Have you tried VS2019 Community? Give it a go if you haven't! Note that the default install options are not suitable for developing with C++. You'll need to select for install the necessary C++ options.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
December 8th, 2019, 06:11 AM
#9
Re: C MDI Editor using RichEdit
Originally Posted by 2kaud
VS2019 Community Edition is fully-featured. The only real difference between the 2019 Community Version and the Professional Edition is the licensing. Have you tried VS2019 Community? Give it a go if you haven't! Note that the default install options are not suitable for developing with C++. You'll need to select for install the necessary C++ options.
I will take a look at VS Community 2019.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|