[scintilla] MFC wrappers
by Horace other posts by this author
Jun 26 2003 6:40PM messages near this date
Re: [scintilla] gtk+ tabs patch (buggy)
|
[scintilla] [ scintilla-Feature Requests-761678 ] Invisible
indicator style
On Wed, 12 Mar 2003 00:55:30 +0100 Antonio Tejada Lacaci wrote :
> You may find useful my Scintilla MFC wrappers (Ctrl and View)
> http://personal.telefonica.terra.es/web/atejadalacaci/
> Note that they are very experimental (there's very little event
> support), though they work fine for me.
> There's no sample app, use them as any other MFC View or Ctrl.
Well, Scintilla events can be incrementally added but the point is I can't
get these
MFC wrappers working for my MDI/MFC project. My code looks like this :
BOOL CMyApp::InitInstance()
{
...
// Register the application's document templates.
m_pDocTemplate = new CMultiDocTemplate(
IDR_EDITTYPE,
RUNTIME_CLASS(CScintillaEditDoc),
RUNTIME_CLASS(CScintillaChildFrame), // custom MDI child frame
RUNTIME_CLASS(CScintillaEditView));
AddDocTemplate(m_pDocTemplate);
...
}
...
void CMyApp::OnFileNew() {
m_pDocTemplate-> OpenDocumentFile(NULL);
}
// Antonio's wrapper
BOOL CScintillaEditView::Create(LPCTSTR lpszClassName, LPCTSTR
lpszWindowName,
DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext*
pContext)
{
BOOL bRes;
bRes = CWnd::Create( lpszClassName, lpszWindowName, dwStyle,
rect, pParentWnd, nID, pContext); // this line failed when
executing the program (access violation)
...
}
It compiles OK, but when I tried to create new file, it fails at where I
specified above, due to access violation.
Can anybody be so kind to tell me what am I doing wrong ? Thanks in advance.
Regards
Horace, T.L.Ho
_______________________________________________
Scintilla-interest mailing list
Scintilla-interest@[...].org
http://mailman.lyra.org/mailman/listinfo/scintilla-interest
|