Thank you @daniel_cadext . This was so useful. With this, I finished doing a Proof of Concept version my addIn.
I made a floating dialog box of the present graphics view. And I made it to move with cursor. I did with a modeless dialog box.
But I stumbled upon major issue. After debugging step by step, I saw that the lockDocument method was creating a major issue. When I ran the command, it creates endless UNDO markers. I mean after issuing my command, although the dialog box shows up and control is given back to commandline, whenever I move the mouse, there is a lockDocument called and it is marked as a "Undo"able task. So I end up with so many markers.
Code snipped beolow:
AcApDocument* pDoc = acDocManager->document(pDb);
acDocManager->setCurDocument(pDoc);
acDocManager->lockDocument(pDoc);
If I remove the lockDocument (and its unlockDocument), the code still works without issue.
So my questions is, is it necessary to "lockDocument" if I don't intend to change anything in the document? What are the risks?
Thanks