在MFC中操作WORD,如何使已经首行悬进的段落,去掉该段落的首行悬进.VBA代码如下:
With Selection.ParagraphFormat
.LeftIndent = MillimetersToPoints(0)
.RightIndent = MillimetersToPoints(0)
.SpaceBefore = 0
.SpaceBeforeAuto = False
.SpaceAfter = 2.5
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl = False
.KeepWithNext = False
.KeepTogether = False
.PageBreakBefore = False
.NoLineNumber = False
.Hyphenation = True
.FirstLineIndent = MillimetersToPoints(0)
.OutlineLevel = wdOutlineLevelBodyText
.CharacterUnitLeftIndent = 0
.CharacterUnitRightIndent = 0
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0.5
.AutoAdjustRightIndent = False
.DisableLineHeightGrid = False
.FarEastLineBreakControl = True
.WordWrap = True
.HangingPunctuation = True
.HalfWidthPunctuationOnTopOfLine = False
.AddSpaceBetweenFarEastAndAlpha = False
.AddSpaceBetweenFarEastAndDigit = False
.BaseLineAlignment = wdBaselineAlignAuto
End With
如何转换为VC代码呢?
With Selection.ParagraphFormat
.LeftIndent = MillimetersToPoints(0)
.RightIndent = MillimetersToPoints(0)
.SpaceBefore = 0
.SpaceBeforeAuto = False
.SpaceAfter = 2.5
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl = False
.KeepWithNext = False
.KeepTogether = False
.PageBreakBefore = False
.NoLineNumber = False
.Hyphenation = True
.FirstLineIndent = MillimetersToPoints(0)
.OutlineLevel = wdOutlineLevelBodyText
.CharacterUnitLeftIndent = 0
.CharacterUnitRightIndent = 0
.CharacterUnitFirstLineIndent = 0
.LineUnitBefore = 0
.LineUnitAfter = 0.5
.AutoAdjustRightIndent = False
.DisableLineHeightGrid = False
.FarEastLineBreakControl = True
.WordWrap = True
.HangingPunctuation = True
.HalfWidthPunctuationOnTopOfLine = False
.AddSpaceBetweenFarEastAndAlpha = False
.AddSpaceBetweenFarEastAndDigit = False
.BaseLineAlignment = wdBaselineAlignAuto
End With
如何转换为VC代码呢?
解决方案 »
- VS2010 ribbon ui 自定义命令按钮 怎么显示对应的快捷键,类似于自动生成的“复制”功能
- 如何在文本框中捕捉用户输入的字符,并在另一个文本框中现示!
- 虚心请教大家一个关于 recv 接收数据不完全的问题
- 如何在VC8中使用DEF文件导出class
- 《C++ Primer》与《The C++ Programming Language》之比较
- 求教:如何实现系统控制/禁止使用USB存储设备?
- 奇怪的现象,在线程中使用SOCKET,该线程有时会退出,导致程序退出.
- 我对于进程映射到内存中的看法不知道对不对,希望大家进来看看,发表以下看法
- 怎样才能调整窗体上控件的位置和大小啊。??
- 发行ActiveX控件,除了OCX还需要什么文件
- MFC中全局变量的类的设置方法
- 怎样用表型记录集新建基本表
pf->PutProperty("LeftIndent", COleVariant(...));
pf->PutProperty("RightIndent", COleVariant(...));
......
Selection.ParagraphFormat.FirstLineIndent = 0
Selection.ParagraphFormat.CharacterUnitFirstLineIndent = 0
Selection.ParagraphFormat.FirstLineIndent = 0
_ParagraphFormat pf1 = mysel.GetParagraphFormat();
pf1.SetFirstLineIndent(0);
pf1.SetCharacterUnitFirstLineIndent(0);
pf1.SetFirstLineIndent(0);