Skip to content

Commit

Permalink
20.3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
I-Rinka committed Mar 13, 2020
1 parent f62a36e commit 1d7bdfb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions WinKeyboardLocker/KeyboardLocker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class WinToastHandler : public IWinToastHandler {

void toastActivated(int actionIndex) const {
//click button
//为了防止键盘在解锁时用户点击“解锁”出现键盘锁定的情况,因此必须使得以“锁定状态”进入
isLocked = true;
KeyboardLocker();
}

Expand Down Expand Up @@ -152,6 +154,11 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
SetForegroundWindow(hwnd);//使得菜单出现后,单击菜单外的使地方选框消失
CreatTrayMenu(hwnd);
}
//双击图标时锁定/解锁键盘
else if (lParam == WM_LBUTTONDBLCLK)
{
KeyboardLocker();
}
break;

case WM_DESTROY:
Expand Down

0 comments on commit 1d7bdfb

Please sign in to comment.