Undo / Redo Count?

T

Tosh

I'm using the Visio Drawing Control (VCD) hosted in a C# application. Best
Practices say to use my own menus and toolbars rather than Visio's. I have
toolbar buttons for Undo and Redo, and they work just fine.

What I want to do is disable Undo when there is nothing to Undo, and disable
Redo when nothing has been undone. Is there something like an
UndoStack.Count on a page, document, or application object somewhere?

TIA
 
J

JuneTheSecond

Hi Tosh,

My idea is to count the row number of sub menu in the undo tool button.
You are working on Drawing Control,
so you might need to count in the invisible Visio application.
AddUndoUnit may increment and decrement the undo or redo unit.
The result is shown on the rows in the tool button.

Or, I thouhgt you might count the undo times by adding any code to
clsParticipateInUndo or clsParticipateInUndo.
They are in the code librarian of Visio SDK.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top