- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Unable to create a Rich Edit control using either the resource editor or the CreateWindow command.
When a Rich Edit control is created in a dialog box using the resource editor the program fails on executation with the error message, "error initializing application". When trying to create a Rich Edit control using "RichEdit_class" with the CreateWindow command the CreateWindow instruction fails to create the control and returns a "0" handle.
See attached sample project for example of the problem. The sample project is a basic dialog Windows application created using the new project wizard and adding a richedit control to the dialog box. The project was compiled and executed both before and after adding the rich edit control. The program executed correctly with out the control but failed when the control was added.
When a Rich Edit control is created in a dialog box using the resource editor the program fails on executation with the error message, "error initializing application". When trying to create a Rich Edit control using "RichEdit_class" with the CreateWindow command the CreateWindow instruction fails to create the control and returns a "0" handle.
See attached sample project for example of the problem. The sample project is a basic dialog Windows application created using the new project wizard and adding a richedit control to the dialog box. The project was compiled and executed both before and after adding the rich edit control. The program executed correctly with out the control but failed when the control was added.
- Balises:
- Intel® Fortran Compiler
Lien copié
4 Réponses
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
See Q261171. Adding LoadLibrary("riched32.dll"C) at the beginning of your WinMain solved the (part of the) problem. Alternatively, you can manually change "RICHEDIT20A" in richedit.rc and load library "riched20.dll" if you need RichEdit v2.
I doubt you can make DlgSet/DlgGet functions work on a RichEdit, though. You'll have to use native APIs (DlgSendCtrlMessage) to communicate with it.
Jugoslav
I doubt you can make DlgSet/DlgGet functions work on a RichEdit, though. You'll have to use native APIs (DlgSendCtrlMessage) to communicate with it.
Jugoslav
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
And do somebody know how to drop ASCII files into the RichEditBox? Is it possible to do it from the folder by drawing them with the mouse or even e.g. by double click in the ListBox which is located in the same dialog like RichEditBox. If its possible, the short part of source code would be very appreciated.
Lada.
Lada.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Didn't do it myself -- judging on documentation, shouldn't be so hard. You should add WS_EX_ACCEPTFILES window style to the window and call DragAcceptFiles for the window. Then, handle WM_COMMAND/EN_DROPFILES message from RichEdit in the parent window -- call DragQueryFiles to retrieve the file name, OPEN it and copy its contents to the RichEdit, then call DragFinish. See WM_DROPFILES, EN_DROPFILES, DragQueryFiles, DragFinish in the docs.
Oh, and you can't do it with DFLOGM-handled dialog :-D.
Was it you that asked me about XFLOGM about a month ago?XFLOGM 2.0 will be there next week (I sincerely hope so) and you will be able to do it there .
Jugoslav
Oh, and you can't do it with DFLOGM-handled dialog :-D.
Was it you that asked me about XFLOGM about a month ago?
Jugoslav
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Yes, it was me, who is interested in your Xflogm. But I am not in a hurry. Thanks for your replay.
Lada
Lada

Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable