15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


CEditView

Amir Salzberg -- amirzel@datasrv.co.il
Thursday, January 04, 1996

In MFC, you can access CEditView directly (not by CDocTemplate). The only
problem is how do you use the parameters of CCreateContext, or more likely
what parameters of CCreateContext do you use to implement CEditView (it can't
be NULL)?




Paul Cook -- pxc@kid01pml.icl.co.uk
Monday, January 08, 1996


> what parameters of CCreateContext do you use to implement CEditView (it can't
> be NULL)?

Try this....

   CCreateContext cs;
   cs.m_pNewViewClass = RUNTIME_CLASS(CFrameEditView);

   m_ctlEditView.Create(NULL, // actually "EDIT", but causes assertion
                        NULL,
                        CEditView::dwStyleDefault,
                        yourEditRect,
                        this,
                        IDC_YOUR_EDITVIEW_ID,
                        &cs);

HTH,
Paul.
---
      o o o o o o . . .   ________________________ _________________________
    o      _____          ||Paul Cook            | ||pxc@kid01pml.icl.co.uk|
  .][__n_n_|DD[  ====___  ||Process Mgmt Centre  | ||+44 (0)1782 794742    |
 >(________|__|_[_______]_||ICL__________________|_||______________________|_
 _/oo OOOOO oo`  oo  oo   'o^o                o^o` 'o^o                 o^o`
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-



Amir Salzberg -- amirzel@datasrv.co.il
Sunday, January 14, 1996

At 10:20 AM 1/8/96 GMT, Paul Cook replied:
>
>> what parameters of CCreateContext do you use to implement CEditView (it can't
>> be NULL)?
>
>Try this....
>
>   CCreateContext cs;
>   cs.m_pNewViewClass = RUNTIME_CLASS(CFrameEditView);
>
>   m_ctlEditView.Create(NULL, // actually "EDIT", but causes assertion
>                        NULL,
>                        CEditView::dwStyleDefault,
>                        yourEditRect,
>                        this,
>                        IDC_YOUR_EDITVIEW_ID,
>                        &cs);

Well, I tried this in my Visual c++ 1.52, but it states an error at run-time:
Divide by zero. I don't why, but the paramemter you suggested in not enough,
there should be at list once more. Any suggestions?





| Вернуться в корень Архива |