Hello all.
I'm trying to make a good undo routine for a form very similar to ms word's. I have written a stack class that I'm using as the basis of my undo data, but I need to figure out a way to actually keep track of the changing data.
I've tried pushing the address to the location where the text or value property is stored then calling it up with the following code:
The first portion of data is the data size in bytes derived by using lenb(value or data variable here). the second part of the data is the memory location where the text or data property exists derived by using varptr(text od value property here), and the third part is the text or data values themselves.
vb Code:
30 vl_Unparsed_str = Split(vm_Undo_cls.Pop, "?") 40 vl_DataSize_lng = vl_Unparsed_str(0) 50 vl_DataPtr_lng = vl_Unparsed_str(1) 60 vl_Data_str = vl_Unparsed_str(2) 70 CopyMemory vl_DataPtr_lng, vl_Data_str, vl_DataSize_lng
I use this code, but the control never displays the new data. On the other hand, the IDE doesn't crash, so I know I'm not entirely off. Maybe there's some way to manually refresh a control?
If anyone has any better methods/ideas I'd be happy to hear them!




Reply With Quote