How to call function of Dialog box from custom tree control class?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi to all,

I am creating a dialog based apllication in MFC. In
which I have created my own Tree class derived from CTreeCtrl which
shows all the image files and folders(.bmp,.jpg etc).
Now my problem is when user selects the file from tree ctrl that
image should be displayed in the dialog box. I tried to call the
function of dialog box's ShowImages(CString strPath) from tree
controls OnSelectionChanged event handler function but it fails for
assertion at the time of
CClientDC dc(this); this function.
Tree is in the same dialog where i want show the Images.

Plz help me.
I m stuck with this problem for 2 days.

thx in advance,
Klic

.



Relevant Pages

  • Calling dialog class function from custom TreeCtrl class.
    ... I am creating a dialog based apllication in MFC. ... which I have created my own Tree class derived from CTreeCtrl which ... shows all the image files and folders. ... Now my problem is when user selects the file from tree ctrl that ...
    (microsoft.public.vc.language)
  • Re: How to call function of Dialog box from custom tree control class?
    ... ON_REFLECT_EX on the parent. ... parent be in on the game as well. ... shows all the image files and folders. ... Now my problem is when user selects the file from tree ctrl that ...
    (microsoft.public.vc.mfc)
  • Re: How to call function of Dialog box from custom tree control class?
    ... ON_REFLECT_EX on the parent. ... That is precisely the purpose of it: ... shows all the image files and folders. ... Now my problem is when user selects the file from tree ctrl that ...
    (microsoft.public.vc.mfc)
  • Re: How to call function of Dialog box from custom tree control class?
    ... shows all the image files and folders. ... Now my problem is when user selects the file from tree ctrl that ... which would then call ShowImages(). ... but try the Post Message. ...
    (microsoft.public.vc.mfc)
  • Re: CTreeCtrl question
    ... If you have multiple views you have multiple CTreeCtrls and HTREEITEM of one is not related in any way to the HTREEITEM of the other. ... When you change the value of the underlying object, you will have to tell the other trees what object has been changed and the controls can update the tree accordingly. ... > I'm starting a project that will display a lots of data on CTreeCtrl. ...
    (microsoft.public.vc.mfc)