Doubts regarding OCX
Sri Ranjan T. -- tsranjan@mindware.soft.net
Tuesday, April 01, 1997
Environment: NT 4.0 , Visual C++ 4.1
I am given to develop an OCX control for converting RTF format to Text
format.
I am unable to get to know the proper approach for using Richeditcontrol.
Can you please tell me as to how to approach the problem? Can you also
suggest me some books or online material where i can find the
information?
Here i was unable to find any books for developing OCX controls.
I have tried using the OLE control wizard option in the AppWizard and
,without sublassing any control i have created a rich edit control in the
OnCreate() of the control's implementation file.But when i read an RTF
file onto the richedit control,it is displaying the RTF file in the raw
format
i.e with all the control characters.Is this correct way or is their any
other
way to do it?
tsranjan@mindware.soft.net
Ranjan
Zhang -- losho.bbs@bbs.nankai.edu.cn
Wednesday, April 02, 1997
: Environment: NT 4.0 , Visual C++ 4.1
: I am given to develop an OCX control for converting RTF format to Text
: format.
: I am unable to get to know the proper approach for using Richeditcontrol.
: Can you please tell me as to how to approach the problem? Can you also
: suggest me some books or online material where i can find the
: information?
: Here i was unable to find any books for developing OCX controls.
: I have tried using the OLE control wizard option in the AppWizard and
: ,without sublassing any control i have created a rich edit control in the
: OnCreate() of the control's implementation file.But when i read an RTF
: file onto the richedit control,it is displaying the RTF file in the raw
: format
: i.e with all the control characters.Is this correct way or is their any
: other
: way to do it?
: tsranjan@mindware.soft.net
: Ranjan
What are you doing when you read an RTF file to the Richedit Control?
If you are useing StreamIn(CF_RTF,...),the callback function may be called
several times if the file are longer,you should copy "cb" (call function
parameter)bytes to control's buffer each time.
You can also read the code of CRichEditDoc::Stream(..),It is helpful to you.
And,I have made a custom DDX/DDV function to exchange the data between
CString and CRicheditCtrl. If you need it,please contact to gleamd@usa.net,I
will email to you.
Become an MFC-L member
| Вернуться в корень Архива
|