Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

$-respond in dialog based app

Status
Not open for further replies.

josphin

Programmer
Apr 5, 2003
19
BE
hi, i'm writing a dialog based app. i use some keyboard shortcuts with PreTranslateMessage, this all works with (euh) "keys that start with VK_" like the function keys, escape, delete, ... but not with normal letters. I'd like to redirect to a function when the dollar key is pressed down! here is the function code i use now:

BOOL CKassaDlg::preTranslateMessage(MSG* pMsg)
{
switch(pMsg->message)
{ case WM_KEYDOWN: switch(pMsg->wParam)
{ case VK_ESCAPE: OnButtonsluiten();
return TRUE;
case VK_F4: ArtikelGeefAantal();
return TRUE;
case VK_F5: OnButtonTotaal();
return TRUE;
case VK_F6: OnButtonnieuwart();
return TRUE;
case VK_F7: OnButtoneditart();
return TRUE;
case VK_F8: OnButtonleveringen();
return TRUE;
case VK_DOLLAR: OnButtonleveringen();
return TRUE;


case VK_DELETE: ArtikelDelete();
return TRUE;
case VK_ADD: ArtikelPlus();
return TRUE;
case VK_RIGHT: ArtikelPlus();
return TRUE;
case VK_SUBTRACT: ArtikelMin();
return TRUE;
case VK_LEFT: ArtikelMin();
return TRUE;
}

}
return CDialog::preTranslateMessage(pMsg);
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top