回复 5# xyhqqaa
#include <GUIComboBox.au3>
#include <GUIConstants.au3>
#include <winapi.au3>
#include <FontConstants.au3>
$hGUI = GUICreate("Test")
$hFont = _WinAPI_CreateFont(40, 0, 0, 0, 400, False, False, False, $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Arial')
$Combo1 = GUICtrlCreateCombo("-----网站类型-----", 8, 80, 105, 30, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL, $CBS_SIMPLE))
GUICtrlSetData(-1, "门户|视频|游戏|小说|购物|社区|下载")
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x008080)
$hCombo1=GUICtrlGetHandle(-1)
$Combo2 = GUICtrlCreateCombo("", 128, 80, 169, 30, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL, $CBS_SIMPLE))
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x008000)
$hCombo2=GUICtrlGetHandle(-1)
$Button=GUICtrlCreateButton("设置字体",300,340,100,60)
GUISetState()
While 1
$nMsg=GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button
_WinAPI_SetFont($hCombo1,$hFont,True)
_WinAPI_SetFont($hCombo2,$hFont,True)
EndSwitch
WEnd
_WinAPI_DeleteObject($hFont)
|