DeleteAllKeyboardShortcut

Window ››
Parent Previous Next

DeleteAllKeyboardShortcut

Синтаксис

sub DeleteAllKeyboardShortcut(ByVal hWin As HWND)

Описание

Удаляет все горячие клавиши для заданного окна

Параметры

hWin - хендл окна, за которым закреплены клавиши

Платформы

Windows , Linux

Пример

#Include "window9.bi"
Dim As Integer event
Var hwnd=OpenWindow("",10,10,300,100)
AddKeyboardShortcut(hwnd,FCONTROL,VK_Q,1001) 'CTRL+Q
AddKeyboardShortcut(hwnd,FCONTROL,VK_W,1002) 'CTRL+W
ButtonGadget(1,10,10,200,30,"DeleteAllKeyboardShortcut")
Do
  event=WaitEvent
  If event=EventMenu Then
     Select case EventNumber
        Case 1001
           MessBox("","1 меню")
        Case 1002
           MessBox("","2 меню")
     End Select
  EndIf
  If event=EventGadget Then
     If EventNumber = 1 Then
        DeleteAllKeyboardShortcut(hwnd)
     EndIf
  EndIf
  If event=EventClose Then End
Loop

Результат

Created with the Personal Edition of HelpNDoc: Easy EPub and documentation editor