How to access CFormView embedded CListCtrl from CDialog ? - Programmer

This is a discussion on How to access CFormView embedded CListCtrl from CDialog ? - Programmer ; I am having pointer access problem with the following setup in a MDI project. I would appreicate if someone can help. 1) a CListCtrl (call m_List) embedded in a CFormView (class CTextView) 2) Apart from the CListCtrl, CTextView also has ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How to access CFormView embedded CListCtrl from CDialog ?

  1. How to access CFormView embedded CListCtrl from CDialog ?

    I am having pointer access problem with the following setup in a MDI
    project. I would
    appreicate if someone can help.

    1) a CListCtrl (call m_List) embedded in a CFormView (class CTextView)
    2) Apart from the CListCtrl, CTextView also has a button (called
    IDC_PRINTTEXT_BTN)
    that trigger a CDialog (called IDD_PRINTTEXT_DLG defined in class
    CPrintText) pops up.
    3) IDD_PRINTTEXT_DLG consists of a set of control check boxes and
    buttons for
    controlling the printing of data in m_List.

    My problem is:
    How am I suppose to access the CListCtrl variable m_List from
    IDD_PRINTTEXT_DLG? To be
    more specific, how should I refer m_List when I am in CPrintText?

    Many thanks

    CFF

  2. Re: How to access CFormView embedded CListCtrl from CDialog ?

    class CTextView;
    class CPrintText:
    {
    CPrintText(CTextView* pView):m_pView(pView){}
    CTextView* m_pView;
    }

    void CTextView::OnPrintTextBtn()
    {
    CPrintText PrintText(this);
    }
    "CFF" дʼ
    news:2560187f.0408022342.760eed36@posting.google.c om...
    > I am having pointer access problem with the following setup in a MDI
    > project. I would
    > appreicate if someone can help.
    >
    > 1) a CListCtrl (call m_List) embedded in a CFormView (class CTextView)
    > 2) Apart from the CListCtrl, CTextView also has a button (called
    > IDC_PRINTTEXT_BTN)
    > that trigger a CDialog (called IDD_PRINTTEXT_DLG defined in class
    > CPrintText) pops up.
    > 3) IDD_PRINTTEXT_DLG consists of a set of control check boxes and
    > buttons for
    > controlling the printing of data in m_List.
    >
    > My problem is:
    > How am I suppose to access the CListCtrl variable m_List from
    > IDD_PRINTTEXT_DLG? To be
    > more specific, how should I refer m_List when I am in CPrintText?
    >
    > Many thanks
    >
    > CFF




+ Reply to Thread