aprier
August 4th, 2004, 03:20 AM
Hi folks,
I've got following problem :
I have an application with several input windows for different classes. The values are checked if they are within the limits by a function that displays a message with the correct values if not, sets the focus on the edit and restores the last correct value.
under visual 6 following code was perfect :
//--- set focus to last control ---------------------------------------
::SetFocus(pDX->m_hWndLastControl);
//--- if edit control -------------------------------------------------
if (pDX->m_bEditLastControl) // select edit item
{
//--- undo last edit ----------------------------------------------
::SendMessage(pDX->m_hWndLastControl, EM_UNDO, 0, 0);
//--- set selection to last edit ----------------------------------
::SendMessage(pDX->m_hWndLastControl, EM_SETSEL, 0, -1);
}
//--- end - if edit control -------------------------------------------
under .Net it doesn't compile. pDX structure changed :mad:
How can i have the same thing working under .NET ????
Would be very happy if you can please help me because it's important !
thanks in advance,
Andreas
I've got following problem :
I have an application with several input windows for different classes. The values are checked if they are within the limits by a function that displays a message with the correct values if not, sets the focus on the edit and restores the last correct value.
under visual 6 following code was perfect :
//--- set focus to last control ---------------------------------------
::SetFocus(pDX->m_hWndLastControl);
//--- if edit control -------------------------------------------------
if (pDX->m_bEditLastControl) // select edit item
{
//--- undo last edit ----------------------------------------------
::SendMessage(pDX->m_hWndLastControl, EM_UNDO, 0, 0);
//--- set selection to last edit ----------------------------------
::SendMessage(pDX->m_hWndLastControl, EM_SETSEL, 0, -1);
}
//--- end - if edit control -------------------------------------------
under .Net it doesn't compile. pDX structure changed :mad:
How can i have the same thing working under .NET ????
Would be very happy if you can please help me because it's important !
thanks in advance,
Andreas