If you are on windows there is a function ConvertClickToPoint in the MFC samples. You can use it directly to get the gp_Pnt at the mouse click, in the InputEvent method. Then you can use it to create AIS_Point and display it. Remember, all this has to be done on mouse lbutton down event if you have written code from scratch. If you are using the wizard generated code or cut-paste from samples then InputEvent in the View class is the best place to put it.
Sorry, my mistake. It is in the Doc class. In your workspace the class that represents the Document generally named CXXXDoc.cpp where XXX is your project name. There are methods like InputEvent, DragEvent, ShiftInputEvent etc. Or search using these keywords.
Fri, 01/23/2009 - 16:57
I've just got it some weeks ago.
Take a glance at:
http://www.opencascade.org/org/forum/thread_15168/
If this is what you need, I could help you deeper although all the code is there.
Thu, 01/29/2009 - 06:49
If you are on windows there is a function ConvertClickToPoint in the MFC samples. You can use it directly to get the gp_Pnt at the mouse click, in the InputEvent method. Then you can use it to create AIS_Point and display it. Remember, all this has to be done on mouse lbutton down event if you have written code from scratch. If you are using the wizard generated code or cut-paste from samples then InputEvent in the View class is the best place to put it.
Hope this helps
N. Sharjith
Thu, 01/29/2009 - 08:37
Thanks for your Reply
Thu, 01/29/2009 - 09:28
What is " InputEvent in the View class "
Thu, 01/29/2009 - 10:43
Sorry, my mistake. It is in the Doc class. In your workspace the class that represents the Document generally named CXXXDoc.cpp where XXX is your project name. There are methods like InputEvent, DragEvent, ShiftInputEvent etc. Or search using these keywords.