Function CanRedoEditor(ByVal gadget As Long) As Integer
Возвращает результат возможности сделать операцию возврата отмененного действия (для EditorGadget).
gadget - номер гаджета
Windows
#Include "window9.bi"
Dim shared As integer event,ToolBar
Dim As HWND hwnd
hwnd=OpenWindow("1",300,10,240,290)
EditorGadget(1,10,40,200,200)
ToolBar=CreateToolBar()
ToolBarStandardButton(ToolBar,2,STD_UNDO)
ToolBarStandardButton(ToolBar,3,STD_REDOW)
ToolBarStandardButton(ToolBar,4,STD_PASTE)
Sub test_
If CanUndoEditor(1)=0 Then
SetButtonToolBarState(ToolBar ,2 , 2 , 1)
Else
SetButtonToolBarState(ToolBar ,2 , 2 , 0)
EndIf
If CanRedoEditor(1)=0 Then
SetButtonToolBarState(ToolBar ,3 , 2 , 1)
Else
SetButtonToolBarState(ToolBar ,3 , 2 , 0)
EndIf
End Sub
Do
event= WaitEvent()
If event=EventClose Then End
If event=EventGadget Then
Select Case EventNumber
Case 2
UndoEditor(1)'Undo
Case 3
RedoEditor(1)'Redo
Case 4
PasteEditor(1,GetClipBoardText)' Paste
End Select
test_
EndIf
Loop
Created with the Personal Edition of HelpNDoc: Easily create EBooks