Click here to Skip to main content
16,005,038 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: who can tell me WHY? Pin
Bob Stanneveld15-Apr-05 5:09
Bob Stanneveld15-Apr-05 5:09 
AnswerRe: who can tell me WHY? Pin
S. Senthil Kumar15-Apr-05 6:38
S. Senthil Kumar15-Apr-05 6:38 
QuestionMS FlexGrid : How to merge 4-cells to a single cell? Pin
jahfer15-Apr-05 4:13
jahfer15-Apr-05 4:13 
Generalmultithreaded tcp server Pin
Member 180081715-Apr-05 2:55
Member 180081715-Apr-05 2:55 
GeneralRe: multithreaded tcp server Pin
Alexander M.,15-Apr-05 3:35
Alexander M.,15-Apr-05 3:35 
GeneralShould be simple CEdit Pin
Punk Legend15-Apr-05 1:14
sussPunk Legend15-Apr-05 1:14 
GeneralRe: Should be simple CEdit Pin
toxcct15-Apr-05 1:40
toxcct15-Apr-05 1:40 
GeneralRe: (Modified)Should be simple CEdit Pin
namaskaaram15-Apr-05 2:50
namaskaaram15-Apr-05 2:50 
(aaah.....i didnt quite follow ur question(i am assuming that u need to verfiy the string entered before enabling a button!!!!!).....
the EN_CHANGE message is called whenever there is a change in the Edit control.....but i beleive u want the final data.....but the en_change only tellz u only when there is a change in the data....and gives u no clue if the data entered is over!!!!!(as u dont have a button that updatez the dadta in the edit control).....so herez what u can do(assuming that u press enter key once u have made the changez in the Edit control.....override the function PreTranslateMessage().....

BOOL CXyzDlg::PreTranslateMessage(MSG* pMsg) 
{
	// TODO: Add your specialized code here and/or call the base class

	if(pMsg->message==WM_KEYDOWN)
    {
        if(pMsg->wParam==VK_RETURN)
            pMsg->wParam=VK_TAB;
    }	


	return CDialog::PreTranslateMessage(pMsg);
}


so what we have done here is that,we have made the edit control to loose focus when the enter key is pressed(actually the tab key does that,but we have changed it using the above code)(u can give any key u ant to i just stuck with the enter key).....
now add thiz code to the messahe that is passed when the control is lost ( EN_KILLFOCUS).....

void CXyzDlg::OnKillfocusEdit0() 
{
	// TODO: Add your control notification handler code here

UpdateData(TRUE);//add thiz to update the data!!!!!check here if ur string is the reqiured one!and do the necessary!	

}


by doing thiz we get the final output on th edit control .....hope thiz helpz.....


cheerz.....Big Grin | :-D



"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
GeneralRe: Should be simple CEdit Pin
David Crow15-Apr-05 3:48
David Crow15-Apr-05 3:48 
GeneralRe: Should be simple CEdit Pin
Ravi Bhavnani15-Apr-05 4:10
professionalRavi Bhavnani15-Apr-05 4:10 
GeneralRe: Should be simple CEdit Pin
David Crow15-Apr-05 5:26
David Crow15-Apr-05 5:26 
QuestionHow to load picture to FlexGrid cell in MFC? Pin
jahfer14-Apr-05 23:51
jahfer14-Apr-05 23:51 
AnswerRe: How to load picture to FlexGrid cell in MFC? Pin
22491715-Apr-05 0:42
22491715-Apr-05 0:42 
GeneralRe: How to load picture to FlexGrid cell in MFC? Pin
jahfer15-Apr-05 1:42
jahfer15-Apr-05 1:42 
GeneralRe: How to load picture to FlexGrid cell in MFC? Pin
22491715-Apr-05 1:45
22491715-Apr-05 1:45 
GeneralGet line index of cursor in CRichEditCtrl Pin
Juanpast14-Apr-05 23:43
Juanpast14-Apr-05 23:43 
GeneralRe: Get line index of cursor in CRichEditCtrl Pin
22491715-Apr-05 0:00
22491715-Apr-05 0:00 
GeneralWM_MBUTTONDBLCLK please help me Pin
Member 68936114-Apr-05 23:08
Member 68936114-Apr-05 23:08 
GeneralRe: WM_MBUTTONDBLCLK please help me Pin
22491715-Apr-05 0:01
22491715-Apr-05 0:01 
GeneralRe: WM_MBUTTONDBLCLK please help me Pin
Member 68936115-Apr-05 8:45
Member 68936115-Apr-05 8:45 
GeneralProblem with CListCtrl Pin
Neeranjan14-Apr-05 22:52
Neeranjan14-Apr-05 22:52 
GeneralCant use Ctrl+C like commands with CFormView Pin
ugur_basak14-Apr-05 21:54
ugur_basak14-Apr-05 21:54 
GeneralRe: Cant use Ctrl+C like commands with CFormView Pin
22491714-Apr-05 22:55
22491714-Apr-05 22:55 
GeneralRe: Cant use Ctrl+C like commands with CFormView Pin
ugur_basak14-Apr-05 23:15
ugur_basak14-Apr-05 23:15 
GeneralRe: Cant use Ctrl+C like commands with CFormView Pin
Michael Dunn15-Apr-05 6:05
sitebuilderMichael Dunn15-Apr-05 6:05 

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.