Bill Roper (billroper) wrote,
Bill Roper

Plugging Along

I have now gained substantial traction on the project that I'm working on. This gives me hope that I can actually see it running again some time soon.

You know how it goes -- you rip things up, move them around, and until they're all back together, nothing will compile and link. :)

One of the cute things I found:

If you have an embedded object in your compound document file and have a built-in mechanism for disabling its action -- say, for instance, if it's a hot link to another external document that you've added a flag to that says "Don't Use Me!" -- then you can override the IsBlank() function in the base class. If the object says "Don't Use Me", tell IsBlank() to return TRUE, else FALSE.

When you serialize the container document, it counts all of the non-blank items and serializes those, but doesn't serialize any of the blank items. This means that you don't have to clean up the deactivated items when you deactivate them, because your serialization code will do it for you.

This also means that you don't have to recreate the objects during an "Undo" process. All you have to do is unset the "Don't Use Me" flag that you added to the object and it'll pop back up for you, since you didn't delete the item on the fly, but were able to rely on the serialization code to do it for you.

All this would be more useful if there were more people still using compound documents, I suppose...
Tags: musings, tech, work

  • Time for Rebuilding

    Well, there's nothing like research. Having determined that DDR5 is going to carry a substantial price premium over DDR4 memory for at least a year…

  • Driven Wild

    The studio computer continues to misbehave in various ways. When I fired up Cubase today, I got a lot of nasty, blocky video, despite having cleaned…

  • Some Old Doggerel

    I recall having mangled a CSN tune many years ago on the way to Contraption. Like that convention, the particular co-worker whose code I was digging…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment