Click here to Skip to main content
15,913,722 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can get value of keyboard pressed key? Pin
Rajesh R Subramanian13-Jun-08 6:47
professionalRajesh R Subramanian13-Jun-08 6:47 
GeneralRe: How can get value of keyboard pressed key? Pin
Nish Nishant13-Jun-08 7:10
sitebuilderNish Nishant13-Jun-08 7:10 
GeneralRe: How can get value of keyboard pressed key? Pin
Eytukan13-Jun-08 2:45
Eytukan13-Jun-08 2:45 
GeneralRe: How can get value of keyboard pressed key? Pin
Rajesh R Subramanian13-Jun-08 3:02
professionalRajesh R Subramanian13-Jun-08 3:02 
GeneralRe: How can get value of keyboard pressed key? Pin
Eytukan13-Jun-08 3:14
Eytukan13-Jun-08 3:14 
GeneralRe: How can get value of keyboard pressed key? Pin
Rajesh R Subramanian13-Jun-08 6:48
professionalRajesh R Subramanian13-Jun-08 6:48 
GeneralRe: How can get value of keyboard pressed key? Pin
Eytukan13-Jun-08 7:46
Eytukan13-Jun-08 7:46 
AnswerRe: How can get value of keyboard pressed key? Pin
buntyrolln12-Jun-08 2:33
buntyrolln12-Jun-08 2:33 
Use Richedit instead of smple Editbox. There you can add function on message EN_MSGFILTER. This permits filtering of mouse and keyboard message in the control.

TODO: The control will not send this notification unless you override the
CDialog::OnInitDialog() function to send the EM_SETEVENTMASK message
to the control with either the ENM_KEYEVENTS or ENM_MOUSEEVENTS flag
ORed into the lParam mask.

inside OnInitDialog mask the key events
m_rich.SetEventMask(m_rich.GetEventMask()|ENM_KEYEVENTS);


void CExampleDlg::OnMsgfilter(NMHDR* pNMHDR, LRESULT* pResult)
{
MSGFILTER *pMsgFilter = reinterpret_cast(pNMHDR);
//TODO: Add your control notification handler code here

CString buf;

if(pMsgFilter->msg==WM_CHAR )
{

buf+=pMsgFilter->wParam;

}

*pResult = 0;
}


buntyrolln

AnswerRe: How can get value of keyboard pressed key? Pin
David Crow12-Jun-08 4:06
David Crow12-Jun-08 4:06 
QuestionA simple problem with icon on taskbar button ! Pin
Joseph Marzbani11-Jun-08 23:52
Joseph Marzbani11-Jun-08 23:52 
AnswerRe: A simple problem with icon on taskbar button ! Pin
sudhir_Kumar12-Jun-08 1:30
sudhir_Kumar12-Jun-08 1:30 
GeneralRe: A simple problem with icon on taskbar button ! Pin
Joseph Marzbani13-Jun-08 21:41
Joseph Marzbani13-Jun-08 21:41 
QuestionOnEraseBkgnd() in dialog Pin
Anu_Bala11-Jun-08 23:11
Anu_Bala11-Jun-08 23:11 
AnswerRe: OnEraseBkgnd() in dialog Pin
Nibu babu thomas11-Jun-08 23:28
Nibu babu thomas11-Jun-08 23:28 
AnswerRe: OnEraseBkgnd() in dialog Pin
sudhir_Kumar12-Jun-08 1:13
sudhir_Kumar12-Jun-08 1:13 
AnswerRe: OnEraseBkgnd() in dialog Pin
David Crow12-Jun-08 4:08
David Crow12-Jun-08 4:08 
QuestionHow to design an application to handle versioning issues? Pin
nrj2311-Jun-08 23:10
nrj2311-Jun-08 23:10 
AnswerRe: How to design an application to handle versioning issues? Pin
Saurabh.Garg11-Jun-08 23:53
Saurabh.Garg11-Jun-08 23:53 
QuestionCoordinating between Print Setup dialog and Print dialog Pin
theCPkid11-Jun-08 22:52
theCPkid11-Jun-08 22:52 
AnswerRe: Coordinating between Print Setup dialog and Print dialog Pin
leonigah12-Jun-08 0:46
leonigah12-Jun-08 0:46 
GeneralRe: Coordinating between Print Setup dialog and Print dialog Pin
theCPkid12-Jun-08 2:41
theCPkid12-Jun-08 2:41 
GeneralRe: Coordinating between Print Setup dialog and Print dialog Pin
Nelek12-Jun-08 5:33
protectorNelek12-Jun-08 5:33 
GeneralRe: Coordinating between Print Setup dialog and Print dialog Pin
theCPkid12-Jun-08 21:24
theCPkid12-Jun-08 21:24 
GeneralRe: Coordinating between Print Setup dialog and Print dialog Pin
Nelek12-Jun-08 22:47
protectorNelek12-Jun-08 22:47 
QuestionRemove parent menu item Pin
kildareflare11-Jun-08 22:32
kildareflare11-Jun-08 22:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.