need help with "microsoft rich textbox v6.0" - Programmer

This is a discussion on need help with "microsoft rich textbox v6.0" - Programmer ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: need help with "microsoft rich textbox v6.0"

  1. need help with "microsoft rich textbox v6.0"

    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


  2. 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:oDataExchange(CDataExchange* pDX)
    {
    CPropertyPage:oDataExchange(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" wrote in message
    news:1154633992.863090.59590@75g2000cwc.googlegrou ps.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
    >




+ Reply to Thread