Re: need help with "microsoft rich textbox v6.0"
// callback procedure for loading Rich Text control
static DWORD CALLBACK
LicStreamInCallback(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
{
CFile* pFile = (CFile*) dwCookie;
*pcb = pFile->Read(pbBuff, cb);
return 0;
}
// -------------------------------------------------------------------------
-----
void CMyDialog::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CLicencePg)
DDX_Control(pDX, IDC_TITLE, m_pSubTitle);
DDX_Check(pDX, IDC_ACCEPT, m_bAccept);
//}}AFX_DATA_MAP
CString sTxt = theApp.GetQualifiedPath("myfile.rtf");
CRichEditCtrl* pRichEditCtrl = (CRichEditCtrl*)GetDlgItem(IDC_TEXTBOX);
CFile cFile(LPCSTR(sTxt), CFile::modeRead);
EDITSTREAM es;
es.dwCookie = (DWORD) &cFile;
es.pfnCallback = LicStreamInCallback;
pRichEditCtrl->StreamIn(SF_RTF, es);
}
--
---------------------------------------------------------------------
DataGet? & PocketLog? www.dataget.com
Data Collectors www.baxcode.com
--------------------------------------------------------------------
"diverbeard" <jason.beard@ge.com> wrote in message
news:1154633992.863090.59590@75g2000cwc.googlegroups.com...
Im creating a VC++ MFC Form View application. I'm adding a microsoft
rich textbox control v6.0 control. I would like to open a plain text
file in the control using ...
MyRTBCtrl.LoadFile(LPCTSTR bstrFilename, VARIANT vFileType)
What do I enter for the argument VARIANT vFileType? I can't seem to
find any good documentation on this thing ... and most of the stuff in
the groups is VB.
Thanks
Jason