tailieunhanh - Giáo Trình How To Use AutoIt A Professional Manner part 48

Tham khảo tài liệu 'giáo trình how to use autoit a professional manner part 48', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | EndFunc Example Function Reference GUICtrlCreateMenuItem Creates a MenuItem control for the GUI. GUICtrlCreateMenuItem text menuID menuentry menuradioitem Parameters text The text of the control. menuID Allows you to create a submenu in the referenced menu. If equal -1 it refers to the first level menu. menuentry optional Allows you to define the entry number to be created. The entries are numbered starting at 0. menuradioitem optional 0 default create a normal menuitem 1 create a menuradioitem Return Value Success trà lai ControlID Failure Returns 0. Remarks dê dat cac thuôc tinh cho control ta dùng GUICtrlSet. nêu text thi môt dong ké ngang së dc hiên thi Related GUICtrlSet. GUIGetMsg GUICtrlCreateMenu GUICtrlCreateContextMenu Example include include Opt MustDeclareVars 1 Example Func Example Local defaultstatus status filemenu fileitem helpmenu saveitem Local infoitem exititem recentfilesmenu separator1 viewmenu Local viewstatusitem okbutton cancelbutton statuslabel msg file GUICreate My GUI menu 300 200 Global defaultstatus Ready Global status filemenu GUICtrlCreateMenu File fileitem GUICtrlCreateMenuItem Open filemenu GUICtrlSetState -1 GUI_DEFBUTTON helpmenu GUICtrlCreateMenu saveitem GUICtrlCreateMenuItem Save filemenu GUICtrlSetState -1 GUI_DISABLe infoitem GUICtrlCreateMenuItem Info helpmenu exititem GUICtrlCreateMenuItem Exit filemenu recentfilesmenu GUICtrlCreateMenu Recent Files filemenu 1 separator1 GUICtrlCreateMenuItem filemenu 2 create a separator line viewmenu GUICtrlCreateMenu View -1 1 is created before menu viewstatusitem GUICtrlCreateMenuItem Statusbar viewmenu GUICtrlSetState -1 GUI_CHECKED okbutton GUICtrlCreateButton OK 50 130 70 20 GUICtrlSetState -1 GUI_FOCUS cancelbutton GUICtrlCreateButton Cancel 180 130 70 20 statuslabel GUICtrlCreateLabel defaultstatus 0 165 300 16 BitOR SS_SIMPLE SS_SUNKEN GUISetState While 1 msg GUIGetMsg If msg fileitem Then file FileOpenDialog Choose file. @TempDir All . If .