Search found 55 matches

by dqf88
Mon Oct 08, 2012 1:12 pm
Forum: General Development
Topic: How to use wxRegEx?
Replies: 4
Views: 1976

How to use wxRegEx?

Why do I not get the correct result? wxRegEx ex; wxString pattern = "\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"; if (ex.Compile(pattern)) { wxString email = "[email protected].com"; if (ex.Matches(email )) { wxMessageBox("email is valid/n"); } else { wxMessageBox("email is not valid/n"); } }
by dqf88
Thu Sep 06, 2012 4:25 am
Forum: wxWidgets Development (Chinese)
Topic: 为word添加页眉
Replies: 5
Views: 4225

Re: 为word添加页眉

我使用下面的语句向word中添加页眉文字,但是就是插不进去,也没出现什么错误信息,有哪位高手知道是怎么回事? wxAutomationObject header(oDoc.CallMethod("Sections.Last.Headers.Item", 3L).GetVoidPtr()); header.CallMethod("Range.InsertAfter","页眉文字"); 哎,改变一下参数就行了: wxAutomationObject header(oDoc.CallMethod("Sections.Last.Headers.Item", 1 ).GetVoidPtr()); he...
by dqf88
Thu Sep 06, 2012 4:24 am
Forum: wxWidgets Development (Chinese)
Topic: 为word添加页眉
Replies: 5
Views: 4225

Re: 为word添加页眉

samsam598 wrote:正好特意请教一下(因为搜了N久而未得),这些Automation的 Property (InvokeMethod,SetProperty,GetProperty 的那些具体方法, 一定要在c++环境下能用) 要在什么地方(网站)能查询到比较完整的参考资料?多谢啦!!
http://emonkey.iteye.com/
by dqf88
Tue Sep 04, 2012 4:30 am
Forum: wxWidgets Development (Chinese)
Topic: 为word添加页眉
Replies: 5
Views: 4225

Re: 为word添加页眉

samsam598 wrote:不知你的wx版本及是否unicode build.可先简单试下"页眉文字"=>wxT("页眉文字")
我用得事wxWidgets 2.9.4,unicode版本,加不加wxT都没用
by dqf88
Mon Sep 03, 2012 7:32 am
Forum: wxWidgets Development (Chinese)
Topic: 为word添加页眉
Replies: 5
Views: 4225

为word添加页眉

我使用下面的语句向word中添加页眉文字,但是就是插不进去,也没出现什么错误信息,有哪位高手知道是怎么回事?
wxAutomationObject header(oDoc.CallMethod("Sections.Last.Headers.Item", 3L).GetVoidPtr());
header.CallMethod("Range.InsertAfter","页眉文字");
by dqf88
Thu Aug 30, 2012 5:19 am
Forum: C++ Development
Topic: How to add a picture into footer or header?
Replies: 0
Views: 563

How to add a picture into footer or header?

How to add a picture into footer or header with "wxAutomationObject" ?
by dqf88
Tue Aug 28, 2012 4:28 am
Forum: wxWidgets Development (Chinese)
Topic: 用wxAutomationObject控制word,怎么改变字体颜色
Replies: 2
Views: 3782

Re: 用wxAutomationObject控制word,怎么改变字体颜色

wxColour cr = wxColour(120,19,10);
paragraph.PutProperty("Range.Font.Color", (long)cr.GetRGB());
by dqf88
Mon Aug 20, 2012 8:01 am
Forum: wxWidgets Development (Chinese)
Topic: 给图片添加水印
Replies: 0
Views: 1805

给图片添加水印

怎么给图片添加一个不规则且半透明的水印?这两者怎么只能取其一?求救中…… 我的代码如下: #include <wx/dcmemory.h> #include <wx/dcclient.h> #include <wx/dc.h> enum Alignment { aLeftTop=0, aLeftBottom=1, aRightTop=2, aRightBottom=3, aCenter=4 }; void MarkImage(wxDC &dc,//设备上下文 wxString srcimg,//目标图片 wxString waterimg,//水印图片 wxString desimg,//已添...
by dqf88
Thu Aug 16, 2012 7:50 am
Forum: wxWidgets Development (Chinese)
Topic: wxHtmlEasyPrinting中的中文换行
Replies: 0
Views: 1718

wxHtmlEasyPrinting中的中文换行

在使用wxHtmlEasyPrinting时,怎么让中文自动换行?
by dqf88
Fri Aug 10, 2012 10:05 am
Forum: wxWidgets Development (Chinese)
Topic: 用wxAutomationObject控制word,怎么改变字体颜色
Replies: 2
Views: 3782

用wxAutomationObject控制word,怎么改变字体颜色

我用下面的代码来改变段落颜色,怎么得不到我想要的颜色?请高手赐教。 oDoc.CallMethod("Content.InsertAfter","测试插入文字!"); wxAutomationObject paragraph; oDoc.GetObject(paragraph, "Paragraphs.Last"); paragraph.PutProperty("Alignment", long(c_ALIGN_CENTER)); paragraph.PutProperty("SpaceAfter", long(0)); paragraph.PutProperty("SpaceBefore",...