Click here to Skip to main content
15,887,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Static class members Pin
csrss16-May-11 5:52
csrss16-May-11 5:52 
GeneralRe: Static class members [modified] Pin
Stefan_Lang16-May-11 6:11
Stefan_Lang16-May-11 6:11 
QuestionCreating a window without focus [modified] Pin
csrss15-May-11 2:25
csrss15-May-11 2:25 
AnswerRe: Creating a window without focus Pin
Luc Pattyn15-May-11 2:45
sitebuilderLuc Pattyn15-May-11 2:45 
GeneralRe: Creating a window without focus Pin
csrss15-May-11 2:50
csrss15-May-11 2:50 
AnswerRe: Creating a window without focus Pin
Alain Rist15-May-11 3:43
Alain Rist15-May-11 3:43 
GeneralRe: Creating a window without focus Pin
csrss15-May-11 4:57
csrss15-May-11 4:57 
QuestionHow to get the keyboard event? Pin
sharanu14-May-11 23:06
sharanu14-May-11 23:06 
Hi all,
I have created one application,where i am incrmenting and decrementing values using CSpinControl.
It is incrementing and decrmenting.
Now i want to increment and decement the same using keyboard up and event press using keyboard.


void CTestDlg::OnDeltaposSpinTest(NMHDR* pNMHDR, LRESULT* pResult) 
{
	NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;
	// TODO: Add your control notification handler code here
	if (pNMUpDown->iDelta == 1)
	{
	//	num = num + resolution;
			//flag_value=1;
			m_strvalue--;
		UpdateData(FALSE);
	}
	else
	{
	//	num = num - resolution;
			//flag_value=0;
			m_strvalue++;
	UpdateData(FALSE);
	}

	*pResult = 0;
}


void CTestDlg::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	// TODO: Add your message handler code here and/or call default
	m_strvalue--;
		UpdateData(FALSE);
	CDialog::OnKeyUp(nChar, nRepCnt, nFlags);
}

void CTestDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	// TODO: Add your message handler code here and/or call default
		m_strvalue++;
	UpdateData(FALSE);
	CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
}

but it is not doing it.

can anyone help me.
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan

AnswerRe: How to get the keyboard event? Pin
«_Superman_»15-May-11 2:00
professional«_Superman_»15-May-11 2:00 
AnswerRe: How to get the keyboard event? Pin
Mark Salsbery15-May-11 8:39
Mark Salsbery15-May-11 8:39 
QuestionEdit Text Pin
john563214-May-11 22:46
john563214-May-11 22:46 
AnswerRe: Edit Text Pin
Mark Salsbery14-May-11 22:58
Mark Salsbery14-May-11 22:58 
AnswerRe: Edit Text Pin
Hans Dietrich14-May-11 23:08
mentorHans Dietrich14-May-11 23:08 
AnswerRe: Edit Text Pin
Alain Rist14-May-11 23:15
Alain Rist14-May-11 23:15 
QuestionLButtonDown Event on Button Pin
sharanu14-May-11 22:00
sharanu14-May-11 22:00 
AnswerRe: LButtonDown Event on Button Pin
Hans Dietrich14-May-11 22:53
mentorHans Dietrich14-May-11 22:53 
Questionadd menu item Pin
john563214-May-11 16:05
john563214-May-11 16:05 
QuestionRe: add menu item Pin
Mark Salsbery14-May-11 16:20
Mark Salsbery14-May-11 16:20 
AnswerRe: add menu item Pin
Richard MacCutchan14-May-11 21:23
mveRichard MacCutchan14-May-11 21:23 
AnswerRe: add menu item Pin
Alain Rist14-May-11 22:02
Alain Rist14-May-11 22:02 
QuestionWho calls main() Pin
Pranit Kothari13-May-11 22:53
Pranit Kothari13-May-11 22:53 
AnswerRe: Who calls main() Pin
Paul Michalik14-May-11 0:42
Paul Michalik14-May-11 0:42 
AnswerRe: Who calls main() Pin
Luc Pattyn14-May-11 2:42
sitebuilderLuc Pattyn14-May-11 2:42 
GeneralRe: Who calls main() Pin
Richard MacCutchan14-May-11 2:58
mveRichard MacCutchan14-May-11 2:58 
GeneralRe: Who calls main() Pin
Luc Pattyn14-May-11 3:12
sitebuilderLuc Pattyn14-May-11 3:12 

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.