Ability to cancel keys input dialog
This commit is contained in:
parent
b88be3a9ee
commit
8733067f5b
|
@ -1148,6 +1148,7 @@ static void ClearExtraMeta(int* key)
|
||||||
|
|
||||||
static int DWBStarted;
|
static int DWBStarted;
|
||||||
static ButtConfig *DWBButtons;
|
static ButtConfig *DWBButtons;
|
||||||
|
static ButtConfig DWBButtonsBackup;
|
||||||
static const char *DWBText;
|
static const char *DWBText;
|
||||||
static uint8 DWBFirstPress;
|
static uint8 DWBFirstPress;
|
||||||
|
|
||||||
|
@ -1259,6 +1260,7 @@ static INT_PTR CALLBACK DWBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
key = 0;
|
key = 0;
|
||||||
DWBFirstPress = 1;
|
DWBFirstPress = 1;
|
||||||
memset(keyonce, 0, sizeof(keyonce));
|
memset(keyonce, 0, sizeof(keyonce));
|
||||||
|
memcpy(&DWBButtonsBackup, DWBButtons, sizeof(ButtConfig));
|
||||||
SetWindowText(hwndDlg, (char*)DWBText); //mbg merge 7/17/06 added cast
|
SetWindowText(hwndDlg, (char*)DWBText); //mbg merge 7/17/06 added cast
|
||||||
BeginJoyWait(hwndDlg);
|
BeginJoyWait(hwndDlg);
|
||||||
KeyboardSetBackgroundAccess(true);
|
KeyboardSetBackgroundAccess(true);
|
||||||
|
@ -1289,6 +1291,9 @@ static INT_PTR CALLBACK DWBCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
|
||||||
free(nstr);
|
free(nstr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case BTN_CANCEL:
|
||||||
|
memcpy(DWBButtons, &DWBButtonsBackup, sizeof(ButtConfig));
|
||||||
|
goto gornk;
|
||||||
case BTN_CLOSE:
|
case BTN_CLOSE:
|
||||||
gornk:
|
gornk:
|
||||||
KillTimer(hwndDlg,666);
|
KillTimer(hwndDlg,666);
|
||||||
|
|
|
@ -114,7 +114,8 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Press a key or a button",LBL_DWBDIALOG_TEXT,7,9,237,8
|
LTEXT "Press a key or a button",LBL_DWBDIALOG_TEXT,7,9,237,8
|
||||||
PUSHBUTTON "Clear",BTN_CLEAR,64,32,50,14
|
PUSHBUTTON "Clear",BTN_CLEAR,64,32,50,14
|
||||||
PUSHBUTTON "OK",BTN_CLOSE,188,33,50,14
|
PUSHBUTTON "Cancel",BTN_CANCEL,126,32,50,14
|
||||||
|
PUSHBUTTON "OK",BTN_CLOSE,188,32,50,14
|
||||||
END
|
END
|
||||||
|
|
||||||
FKBDIALOG DIALOGEX 13, 72, 402, 194
|
FKBDIALOG DIALOGEX 13, 72, 402, 194
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue