Skip to content

Commit

Permalink
Update #277 Change the report level with the keys 1 to 6
Browse files Browse the repository at this point in the history
  • Loading branch information
cplussharp committed Jan 26, 2017
1 parent eef58a5 commit b1edff4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/TextInfoForm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,21 @@ void CTextInfoForm::OnSize(UINT nType, int cx, int cy)
}
}

BOOL CTextInfoForm::PreTranslateMessage(MSG *pmsg)
{
switch (pmsg->message) {
case WM_KEYDOWN:
// Keys 1 to 6 change the report level
if (pmsg->wParam > 0x30 && pmsg->wParam <= 0x36) {
int sel = pmsg->wParam - 0x30 - 1;
combo_reporttype.SetCurSel(sel);
OnBnClickedButtonRefresh();
return TRUE;
}
}
return __super::PreTranslateMessage(pmsg);
}


// CTextInfoForm message handlers

Expand Down
1 change: 1 addition & 0 deletions src/TextInfoForm.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class CTextInfoForm : public CGraphStudioModelessDialog
BOOL DoCreateDialog(CWnd* parent);

void OnSize(UINT nType, int cx, int cy);
BOOL PreTranslateMessage(MSG *pmsg);
void OnInitialize();
void OnBnClickedButtonRefresh();

Expand Down

0 comments on commit b1edff4

Please sign in to comment.