＜本文发表于: 相约加拿大:枫下论坛 www.rolia.net/f ＞
Hi! every body, thanks in advance:
My problem is:
1. a new class CSeed is inherited from CObject (in order to exchange the date dynamically). there is a Draw method according to the member variable Position.
2. In my document there is a CObList member to manage the information of the seeds.
3. In my class CScrollView (multi -doc):
a)respond to the message WM_LBUTTONDBLCLK to create seeds on the screen, and store all the seeds in the CObList.
b)OnDraw to draw all the seeds by extracted the information from the COblist.
the Problem is:
All seed positions responding to left double click are changed.
when the scroll bar at middle of the window, double click to draw a seed at (x, 10) relative to the corrent view (note: the position on the canvas is not sure). when the scroll bar change position , the OnDraw methods reapint the seeds at the Point(x, 10) on the canvas, however I wish the seeds is still at the original pos relative to the canvas.
I had use the DPtoLP to change the coordinate. however it does not work.＜本文发表于: 相约加拿大:枫下论坛 www.rolia.net/f ＞