关于富文本的创建问题
各位高手:本人用$oRP = ObjCreate("RICHTEXT.RichtextCtrl.1")
$GUIActiveX = GUICtrlCreateObj($oRP, 10, 10, 400, 260)
GUICtrlSetPos($GUIActiveX, 10, 10, 400, 260)
创建了RICHTEXT ActiveX控件,为了能读取rtf,以及图片,我在其中输入内容后,我想读取我输入的内容,可是怎么也办不到.
请大侠帮帮忙,谢谢.
[ 本帖最后由 neity 于 2008-12-14 10:37 编辑 ] :face (32): 贴上你的代码,或是请清楚一点! #include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 313, 271, 198, 125, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
$Edit1 = GUICtrlCreateEdit("", 16, 24, 273, 81)
GUICtrlSetData(-1, "")
$oRP = ObjCreate("RICHTEXT.RichtextCtrl.1")
$GUIActiveX = GUICtrlCreateObj($oRP, 16, 144, 273, 97)
GUICtrlSetPos($GUIActiveX, 16, 144, 273, 97)
With $oRP; Object tag pool
.OLEDrag()
.Font = 'Arial'
.text = ""
;.FileName = @ScriptDir & '\RichText.rtf'
;.BackColor = 0xff00
EndWith
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Edit1
_copy()
EndSwitch
WEnd
Func _copy()
$oRP.text = GUICtrlRead($Edit1)
EndFunc
在Edit1框中输入字符,点击$GUIActiveX 窗口字符正常复制.而$Edit1 = GUICtrlRead($oRP.text),在$GUIActiveX中输入字符去不能被正常复制到框中,这是为何?
还有怎么实现在Edit1框中输入字符,立即在GUIActiveX框中显示出来,不需要点击鼠标. GUICtrlSetData($Edit1, $oRP.text) 如果要保留原来编辑框中的数据:
GUICtrlSetData($Edit1, $oRP.text, 0) 先运行下,再说,谢谢诶!没用呀,运行不了:face (33): 我只是想用QQ刷屏,现在只是文本刷屏,能不能刷图形儿???????????????????????:face (3):
页:
[1]