#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("")
Local $idedit = GUICtrlCreateEdit("", 0, 0,200,300, BitOR($ES_WANTRETURN, $WS_VSCROLL, $ES_AUTOVSCROLL))
Local $idMenu1 = GUICtrlCreateMenu("Конструкции языка си")
Local $idMenu1Item = GUICtrlCreateMenu("Циклы", $idMenu1)
Local $idfor = GUICtrlCreateMenuItem("Цикл for", $idMenu1Item)
Local $idwhile = GUICtrlCreateMenuItem("Цикл while", $idMenu1Item)
Local $iddowhile = GUICtrlCreateMenuItem("Цикл do-while", $idMenu1Item)
Local $idMenu2Item= GUICtrlCreateMenu("Ветвления", $idMenu1)
Local $idif = GUICtrlCreateMenuItem("Ветвление if", $idMenu2Item)
Local $idswitch = GUICtrlCreateMenuItem("Ветвление switch", $idMenu2Item)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idfor
GUICtrlSetData($idedit,"for (;;)"& @CRLF& "{" & @CRLF&"}"& @CRLF, 1)
Case $idwhile
GUICtrlSetData($idedit,"while ()"& @CRLF& "{" & @CRLF&"}"& @CRLF, 1)
Case $iddowhile
GUICtrlSetData($idedit,"do"& @CRLF& "{" & @CRLF&"}"& @CRLF &"while();"& @CRLF, 1)
Case $idif
GUICtrlSetData($idedit,"if ()"& @CRLF& "{" & @CRLF&"}"& @CRLF, 1)
Case $idswitch
GUICtrlSetData($idedit,"switch()"& @CRLF& "{" & @CRLF&"}"& @CRLF, 1)
EndSwitch
WEnd
|