# Re: 可以Undo，但仅能Undo最近一次的设定

Posted by jason on December 24, 1998 at 11:05:24:

In Reply to: 可以Undo，但仅能Undo最近一次的设定 posted by cww on December 24, 1998 at 08:36:57:

: Private Sub Command1_Click()
: CommonDialog1.Flags = cdlCFEffects Or cdlCFBoth ' 显示「字型」对话方块
: CommonDialog1.ShowFont
: RichTextBox1.SelFontSize = CommonDialog1.FontSize
: RichTextBox1.SelFontName = CommonDialog1.FontName
: End Sub

如果要undo字型大小应该怎么做?
: Private Sub Command2_Click()
: Dim i As Long
: i = SendMessage(RichTextBox1.hwnd, EM_UNDO, 0, 0)
: End Sub

: 以上面的例子来说，只会undo SelFontName的设定而
: SelFontSize则不受影响，原因很清楚吧

Follow Ups: