Bill Roper (billroper) wrote,
Bill Roper

Somebody Else's Dialog

Somebody Else's Dialog(TM) has been patched and dispatched back to QE for testing.

The absolute capper to the entertainment here was that the dialog wants to invoke a Save As dialog on the way out to let the user decide what file to save the modified contents to. If this were an actual dialog, that would be relatively simple.

However, this is actually a property sheet and there was relatively little that was simple about it. It turns out that the right place to try to patch in the call to the master Save As function is in the OnApply function for each of the property pages that make up the property sheet, because that:

  • will get called when you press the OK button (and Apply is not active for this property sheet)
  • allows you to return FALSE if the user cancels the Save As, which OnOK will not -- once you're there, you're on your way out of the property sheet
  • gets called for every page of the property sheet so that you see the Save As dialog multiple times -- Oops!

    Ok, that's easily fixed. First man in sets a boolean that says don't raise the Save As dialog again; add an OnSetActive override to each page to clear the boolean if/when you return to the property sheet.

    I begin to see why normal people don't handle a Save As dialog this way...
  • Tags: microsoft, musings, work

    • Did I Mention?

      I now have seven boxes of Quest CDs in my living room. Assuming that I'm at OVFF, they'll be there too. :) (*Some* of them. I am not bringing *all*…

    • The Play's the Thing

      And the play K is in is going well. Final performance tonight! I'm looking forward to it.

    • Happy Birthday, Gretchen!

      And here it is, Gretchen's birthday again. Most of the festivities were last night, due to K's being in the school play tonight, so we had a good…

    • Post a new comment


      Anonymous comments are disabled in this journal

      default userpic

      Your reply will be screened

      Your IP address will be recorded