本帖最后由 jale 于 2009-6-11 17:09 编辑
以下代码中GUICtrlSetColor(-1, 0x0000C0)有效,但是GUISetFont(-1,18, 400, 4, "Comic Sans MS") 和GUICtrlSetFont($generalitem[$i],17,1500,0,'宋体')都没效,不知道为什么。。。
While Not $RS_main.eof And Not $RS_main.bof
$string = $RS_main.Fields(0).value
$generalitem[$i] = GUICtrlCreateTreeViewItem($string, $treeview) ; 构建树的父结点
;MsgBox(0,"",$string)
GUISetFont(-1,18, 400, 4, "Comic Sans MS")
GUICtrlSetColor(-1, 0x0000C0)
GUICtrlSetFont($generalitem[$i],17,1500,0,'宋体')
$sql_main_s = "select distinct xtmc from cic.dddl_xt where xtfl = '"&$string&"' and cic.dddl_xt.xtbm in (select xtbm from cic.dddl_yh_xt where yhbm = '" & $YHBM & "')"
$RS_main_s.Open($sql_main_s, $conn_main_s)
While Not $rs_main_s.eof And Not $rs_main_s.bof
$tree_item=GUICtrlCreateTreeViewItem($RS_main_s.Fields(0).value, $generalitem[$i]) ;构建叶子结点
GUICtrlSetFont($tree_item,20,1500,0,'宋体')
_WinAPI_SetFont($tree_item,20)
$RS_main_s.movenext
WEnd
$RS_main.movenext
$i=$i+1
$RS_main_s.close
WEnd |