16,548
社区成员




LineFormat lineFormt(shapeBox.GetLine());
lineFormt.SetVisible(FALSE);
这样就搞定了,还有个问题想确认下,AddLine和AddTextBox这些函数都需要一些坐标值,这个在Word里的单位是用Points来表示吗?我现在程序代码里是Pixels 然后用 WordApp.PixelsToPoints转换,不知道对是不对?
m_LineFormat=m_Shaperange.GetLine();
这就有lineformat接口了吧?
Shapes shapes=m_Doc.GetShapes();
CComVariant varRang1(m_Selection.GetRange()),index(1);
varRang =varRang1;
Shape shape=shapes.AddTextbox(1,(m_HeaderAttention.left2*width*m_HeaderAttention.left1)/(m_nWordWidth*nScreemWidth), (m_HeaderAttention.top3*height*m_HeaderAttention.top1)/(m_HeaderAttention.top2*nScreemHeight)+m_HeaderAttention.littbig,
(m_HeaderAttention.width*width*m_HeaderAttention.left1)/(m_nWordWidth*nScreemWidth), (m_HeaderAttention.height*height*m_HeaderAttention.top1)/(m_nWordHeight*nScreemHeight),&varRang);
shape.Select(&vTrue);
m_Shaperange=m_Selection.GetShapeRange();
m_LineFormat=m_Shaperange.GetLine();