Discussion:
Access methods in View class from toolbar class
(too old to reply)
Z.K.
2007-11-06 22:21:34 UTC
Permalink
I have a custom toolbar class that I wrote which works fine, but I would
like to call a function from my FormView class depending on the value in the
combobox of my toolbar. I am not exactly sure how to access the FormView
from my
toolbar class.

Z.K.
Tom Serface
2007-11-06 23:42:09 UTC
Permalink
I would just have a window pointer that gets assigned in the toolbar with
something like:

m_Toolbar.SetMsgWnd(pView);

Then send a message from the toolbar to the view using PostMessage. Set the
window to NULL so you could know that it isn't set. This isn't the only way
to do it, but it's an easy one to implement.

Tom
Post by Z.K.
I have a custom toolbar class that I wrote which works fine, but I would
like to call a function from my FormView class depending on the value in the
combobox of my toolbar. I am not exactly sure how to access the FormView
from my
toolbar class.
Z.K.
RainMan
2007-11-11 23:08:04 UTC
Permalink
See you other post
--
RainMan
Post by Z.K.
I have a custom toolbar class that I wrote which works fine, but I would
like to call a function from my FormView class depending on the value in the
combobox of my toolbar. I am not exactly sure how to access the FormView
from my
toolbar class.
Z.K.
Ajay Kalra
2007-11-27 03:22:53 UTC
Permalink
I dont think this is the right approach. Toolbar should not be concenred if
there is view or not. The command handlers for the toolbar buttons should
deal with that part.

---
Ajay
Post by Z.K.
I have a custom toolbar class that I wrote which works fine, but I would
like to call a function from my FormView class depending on the value in the
combobox of my toolbar. I am not exactly sure how to access the FormView
from my
toolbar class.
Z.K.
Loading...