Click here to Skip to main content
15,903,203 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to compile a dialog-resource, source files into a DLL Pin
Jason Huang10-May-06 5:31
Jason Huang10-May-06 5:31 
AnswerRe: How to compile a dialog-resource, source files into a DLL Pin
Chris Losinger10-May-06 6:16
professionalChris Losinger10-May-06 6:16 
QuestionOnDraw Vs OnPaint in CView Pin
cpp_prgmer10-May-06 4:37
cpp_prgmer10-May-06 4:37 
AnswerRe: OnDraw Vs OnPaint in CView Pin
Michael Dunn10-May-06 10:02
sitebuilderMichael Dunn10-May-06 10:02 
GeneralRe: OnDraw Vs OnPaint in CView Pin
cpp_prgmer21-May-06 20:28
cpp_prgmer21-May-06 20:28 
QuestionLVN_ITEMCHANGING Pin
YaronNir10-May-06 4:32
YaronNir10-May-06 4:32 
AnswerRe: LVN_ITEMCHANGING Pin
David Crow10-May-06 6:17
David Crow10-May-06 6:17 
GeneralRe: LVN_ITEMCHANGING Pin
YaronNir10-May-06 10:00
YaronNir10-May-06 10:00 
problems...

look at the following code:

void CMyWnd::OnListItemChanging(NMHDR* pNMHDR, LRESULT* pResult)
{
	NMLISTVIEW *pState = (NMLISTVIEW *)pNMHDR;

	if (0 == pState->uNewState && 2 == pState->uOldState)
	{
	   if (!m_pDlg->ValidatePage())
	   {
	 	AfxMessageBox(_T("aa"));
		*pResult = TRUE;
	   }
	   else
	   {
	 	*pResult = FALSE;
	   }
	}
}


First time i step into the function, the uNewState is 0 and uOldState is 2 therefor validation is being checked and a message box pops. the function then returns TRUE which means it doesn't allow the new selection to be made.

but i see i step into this function again, with the same parameter values (for uNewState and uOldState) so once again i see the message box for validation

how can i solve this?

thanks
Yaron

Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp

don't forget to vote Smile | :)
Questionsrvany Problems Pin
steff.k@gmx.net10-May-06 4:16
steff.k@gmx.net10-May-06 4:16 
AnswerRe: srvany Problems Pin
David Crow10-May-06 6:13
David Crow10-May-06 6:13 
GeneralRe: srvany Problems Pin
steff.k@gmx.net10-May-06 21:03
steff.k@gmx.net10-May-06 21:03 
Questionhow to stop the action of one button by pushing another button Pin
joy2110-May-06 3:55
joy2110-May-06 3:55 
AnswerRe: how to stop the action of one button by pushing another button Pin
Cedric Moonen10-May-06 4:01
Cedric Moonen10-May-06 4:01 
QuestionRe: how to stop the action of one button by pushing another button Pin
joy2110-May-06 4:31
joy2110-May-06 4:31 
AnswerRe: how to stop the action of one button by pushing another button Pin
Cedric Moonen10-May-06 4:36
Cedric Moonen10-May-06 4:36 
AnswerRe: how to stop the action of one button by pushing another button Pin
Chris Losinger10-May-06 4:02
professionalChris Losinger10-May-06 4:02 
QuestionMsgsrv.exe Pin
Aryan S10-May-06 3:18
Aryan S10-May-06 3:18 
AnswerRe: Msgsrv.exe Pin
David Crow10-May-06 3:49
David Crow10-May-06 3:49 
AnswerRe: Msgsrv.exe Pin
Steffen Lange10-May-06 5:46
Steffen Lange10-May-06 5:46 
QuestionMetafile Pin
submit-CD10-May-06 3:15
submit-CD10-May-06 3:15 
AnswerRe: Metafile Pin
Chris Losinger10-May-06 3:52
professionalChris Losinger10-May-06 3:52 
GeneralRe: Metafile Pin
submit-CD10-May-06 4:23
submit-CD10-May-06 4:23 
GeneralRe: Metafile Pin
Chris Losinger10-May-06 4:47
professionalChris Losinger10-May-06 4:47 
QuestionShortcuts... Pin
Smith#10-May-06 3:13
Smith#10-May-06 3:13 
AnswerRe: Shortcuts... Pin
Hamid_RT10-May-06 3:25
Hamid_RT10-May-06 3:25 

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.