就比如现在VIEW 视图里 我画一个三角一个方形,他们可以分别选中和设置,选中的是图形明确的边界,而不是矩形区域他们选中时 ,工具栏作出相应的变化 ------------------------------------ 这个需要关联起来2 如何从每个图形把消息发往框架 --------------------------- 哪个框架?主框架?AfxGetMainWnd()->PostMessage/SendMessage3每个图形元素是从CWND 继承吗? 如果要持久化怎么做?? -------------------------------------------- 不一定,要一个类支持序列话, Five main steps are required to make a class serializable. They are listed below and explained in the following sections: 1。 Deriving your class from CObject (or from some class derived from CObject). 2。 Overriding the Serialize member function. 3。 Using the DECLARE_SERIAL macro in the class declaration. 4。 Defining a constructor that takes no arguments. 5。 Using the IMPLEMENT_SERIAL macro in the implementation file for your class. If you call Serialize directly rather than through the >> and << operators of CArchive, the last three steps are not required for serialization.
图形发消息给框架?这个直接发送即可!
不需要从cwnd继承吧,那样也太夸张了!楼主的这些问题,实际上,就是你的数据结构的问题!
那在VIEW 中点击某一个地方,怎么判断点击了那个图形? 遍历所有图形吗?其实就是由点像PHOTOSHOP 中的图形元素
------------------------------------
这个需要关联起来2 如何从每个图形把消息发往框架
---------------------------
哪个框架?主框架?AfxGetMainWnd()->PostMessage/SendMessage3每个图形元素是从CWND 继承吗? 如果要持久化怎么做??
--------------------------------------------
不一定,要一个类支持序列话,
Five main steps are required to make a class serializable. They are listed below and explained in the following sections: 1。 Deriving your class from CObject (or from some class derived from CObject). 2。 Overriding the Serialize member function. 3。 Using the DECLARE_SERIAL macro in the class declaration. 4。 Defining a constructor that takes no arguments. 5。 Using the IMPLEMENT_SERIAL macro in the implementation file for your class. If you call Serialize directly rather than through the >> and << operators of CArchive, the last three steps are not required for serialization.
--------------------------------
PtInRect()/PtInRegion()???