Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » Only one RichEdit on one Form possible?
Only one RichEdit on one Form possible? [message #45525] Fri, 27 November 2015 10:11 Go to next message
WebChaot is currently offline  WebChaot
Messages: 53
Registered: September 2006
Location: Austria, Vienna
Member
Hello!

Have a Problem with RichEdit: I need 4 RichEdit-Components on one Form (for a Report Designer with Header, Body, Footer and another one on another tab of same form). When i put them on Layout in LayoutDesigner and start Application i allways get:

Exception: C00000FD at 00953F67
EXCEPTION_STACK_OVERFLOW

The error list contains:

_chkstk()
Upp::AppExecute_(app=406519)
WinMain(hInstance...)
_tmainCRTStartup()
WinMainCRTStartup()

Because this happens on startup I have no idea, where and how to search. But while playing around, I could find the reason: When changing all RichEdit by RichTextView it works fine (but I'm not able to edit the text). When only put 2 RichEdit and replace the other 2 with RichTextView, it compiles. So, 2 RichEdits at same time seems to work - more of them crashes. No idea why. So I wonder, that I found an ScreenShot in Forum with exactly this layout - why does it work for him?

And when put 2 RichEdit on a Form and assign Toolbar to them, only on first Toolbar the DropLists work - on second there is nothing (except the space for the Controls).

I also tried to assign the 4 RichEdits by code directly instead of designer - but makes no difference Sad


Currently I think about a workaround: Put 4 RichTextView on Form - and onMouseEnter I overlay an RichEdit for this specific field. But thats much work and not really, what I wanted to do. Would only be the last option to get this part of application to work.


Would be great, if anybody has an idea.


Thanks a lot,

WebChaot
Re: Only one RichEdit on one Form possible? [message #45528 is a reply to message #45525] Fri, 27 November 2015 12:43 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
WebChaot wrote on Fri, 27 November 2015 10:11
Hello!

Have a Problem with RichEdit: I need 4 RichEdit-Components on one Form (for a Report Designer with Header, Body, Footer and another one on another tab of same form). When i put them on Layout in LayoutDesigner and start Application i allways get:

Exception: C00000FD at 00953F67
EXCEPTION_STACK_OVERFLOW

The error list contains:

_chkstk()
Upp::AppExecute_(app=406519)
WinMain(hInstance...)
_tmainCRTStartup()
WinMainCRTStartup()

Because this happens on startup I have no idea, where and how to search. But while playing around, I could find the reason: When changing all RichEdit by RichTextView it works fine (but I'm not able to edit the text). When only put 2 RichEdit and replace the other 2 with RichTextView, it compiles. So, 2 RichEdits at same time seems to work - more of them crashes. No idea why. So I wonder, that I found an ScreenShot in Forum with exactly this layout - why does it work for him?

And when put 2 RichEdit on a Form and assign Toolbar to them, only on first Toolbar the DropLists work - on second there is nothing (except the space for the Controls).

I also tried to assign the 4 RichEdits by code directly instead of designer - but makes no difference Sad


Currently I think about a workaround: Put 4 RichTextView on Form - and onMouseEnter I overlay an RichEdit for this specific field. But thats much work and not really, what I wanted to do. Would only be the last option to get this part of application to work.


Would be great, if anybody has an idea.


Thanks a lot,

WebChaot


I suppose you are on MSC compiler.

Add /STACK:20000000 to build method link options.

If you would install the nightly build, it has this option by default.
Re: Only one RichEdit on one Form possible? [message #45530 is a reply to message #45528] Fri, 27 November 2015 13:25 Go to previous messageGo to next message
WebChaot is currently offline  WebChaot
Messages: 53
Registered: September 2006
Location: Austria, Vienna
Member
Hi Mirek!

Yes, it worked! For all the semi-professionals here Smile : What does this parameter?


>>> If you would install the nightly build, it has this option by default.

Hm. On this project I use an (some years) old copy of sources. Maybe I should update them from time to time Smile


Thanks a lot!

Norbert
Re: Only one RichEdit on one Form possible? [message #45531 is a reply to message #45530] Fri, 27 November 2015 13:30 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Quote:
On this project I use an (some years) old copy of sources. Maybe I should update them from time to time
It is very advisable Smile

You may spend some minutes because you may find some changes (few), but U++ is being continuously improved not only in features but in robustness, so it is worthwhile to update it periodically.


Best regards
IƱaki
Re: Only one RichEdit on one Form possible? [message #45536 is a reply to message #45530] Fri, 27 November 2015 17:03 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
WebChaot wrote on Fri, 27 November 2015 13:25
Hi Mirek!

Yes, it worked! For all the semi-professionals here Smile : What does this parameter?



Well, U++ is little by special as by design, placing as much as possible on stack, it uses a lot of stack. sizeof(RichEdit) is about 75KB

Now default stack size for VC++ compiler is only 1MB. If you invoke dialog from some complex main windows, you can run out of stack quite easily.

The option increases the stack size to 20MB...

Mirek
Previous Topic: Qtf and non UTF8 strings
Next Topic: BUG? in TxtPaint.cpp
Goto Forum:
  


Current Time: Fri Apr 19 09:19:42 CEST 2024

Total time taken to generate the page: 0.14906 seconds