| 发表于:2007-08-24 10:36:121楼 得分:0 |
我也遇到了这个问题,并成功解决,现与大家分享: cmyframe* pchildframe = null; cdocument *doc = null; cmyview* pcurview = null; pchildframe = (cmyframe*)this-> mdigetactive(); assert(pchildframe); doc = pchildframe-> getactivedocument(); assert(doc); position pos = doc-> getfirstviewposition (); while (pos != null) { cview *pview = doc-> getnextview (pos); if (pview-> iskindof(runtime_class(cmyview))) { ((cmyview *)(pview))-> myviewfun(); } } | | |
|