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

C / C++ / MFC

 
GeneralRe: How to get datas from an edit control (in the toolbar) by pressing return (enter) ? Pin
Mark Salsbery7-Apr-08 8:31
Mark Salsbery7-Apr-08 8:31 
GeneralRe: How to get datas from an edit control (in the toolbar) by pressing return (enter) ? Pin
CrocodileBuck7-Apr-08 8:47
CrocodileBuck7-Apr-08 8:47 
GeneralRe: How to get datas from an edit control (in the toolbar) by pressing return (enter) ? Pin
Mark Salsbery7-Apr-08 9:01
Mark Salsbery7-Apr-08 9:01 
GeneralRe: How to get datas from an edit control (in the toolbar) by pressing return (enter) ? Pin
CrocodileBuck7-Apr-08 9:22
CrocodileBuck7-Apr-08 9:22 
GeneralRe: How to get datas from an edit control (in the toolbar) by pressing return (enter) ? Pin
CrocodileBuck7-Apr-08 9:30
CrocodileBuck7-Apr-08 9:30 
GeneralRe: How to get datas from an edit control (in the toolbar) by pressing return (enter) ? Pin
Mark Salsbery7-Apr-08 9:36
Mark Salsbery7-Apr-08 9:36 
GeneralRe: How to get datas from an edit control (in the toolbar) by pressing return (enter) ? Pin
CrocodileBuck7-Apr-08 9:45
CrocodileBuck7-Apr-08 9:45 
GeneralRe: How to get datas from an edit control (in the toolbar) by pressing return (enter) ? Pin
Mark Salsbery7-Apr-08 10:00
Mark Salsbery7-Apr-08 10:00 
I'll take a look....

In the meantime, see if adding this to the CMyEdit class works:

Add to CMyEdit.h, in the CMyEdit class declaration:
public:
    virtual BOOL PreTranslateMessage(MSG* pMsg);

Add to CMyEdit.cpp
BOOL CTestEdit::PreTranslateMessage(MSG* pMsg)
{
    if (pMsg->message == WM_KEYDOWN && VK_RETURN == pMsg->wParam) 
    {
        return TRUE;
    }
    else if (pMsg->message == WM_KEYUP && VK_RETURN == pMsg->wParam) 
    {
        // Do stuff!

        return TRUE;
    }

    return CEdit::PreTranslateMessage(pMsg);
}

Maybe that will work better! Smile | :)

Mark





Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: How to get datas from an edit control (in the toolbar) by pressing return (enter) ? Pin
led mike7-Apr-08 10:04
led mike7-Apr-08 10:04 
GeneralRe: How to get datas from an edit control (in the toolbar) by pressing return (enter) ? Pin
Mark Salsbery7-Apr-08 10:11
Mark Salsbery7-Apr-08 10:11 
GeneralRe: How to get datas from an edit control (in the toolbar) by pressing return (enter) ? Pin
CrocodileBuck7-Apr-08 10:59
CrocodileBuck7-Apr-08 10:59 
Generala problem when wait for a thread to be completed Pin
followait7-Apr-08 5:30
followait7-Apr-08 5:30 
QuestionRe: a problem when wait for a thread to be completed Pin
David Crow7-Apr-08 6:05
David Crow7-Apr-08 6:05 
GeneralRe: a problem when wait for a thread to be completed Pin
followait7-Apr-08 7:37
followait7-Apr-08 7:37 
GeneralRe: a problem when wait for a thread to be completed Pin
David Crow7-Apr-08 8:10
David Crow7-Apr-08 8:10 
GeneralRe: a problem when wait for a thread to be completed Pin
Jim Crafton7-Apr-08 9:24
Jim Crafton7-Apr-08 9:24 
GeneralRe: a problem when wait for a thread to be completed Pin
Stephen Hewitt7-Apr-08 15:19
Stephen Hewitt7-Apr-08 15:19 
GeneralRe: a problem when wait for a thread to be completed Pin
ThatsAlok7-Apr-08 19:28
ThatsAlok7-Apr-08 19:28 
GeneralRe: a problem when wait for a thread to be completed Pin
Mark Salsbery7-Apr-08 6:16
Mark Salsbery7-Apr-08 6:16 
GeneralRe: a problem when wait for a thread to be completed Pin
led mike7-Apr-08 7:10
led mike7-Apr-08 7:10 
GeneralRe: a problem when wait for a thread to be completed Pin
Jim Crafton7-Apr-08 9:16
Jim Crafton7-Apr-08 9:16 
GeneralRe: a problem when wait for a thread to be completed Pin
led mike7-Apr-08 10:01
led mike7-Apr-08 10:01 
GeneralRe: a problem when wait for a thread to be completed Pin
ThatsAlok7-Apr-08 19:29
ThatsAlok7-Apr-08 19:29 
GeneralRe: a problem when wait for a thread to be completed Pin
followait7-Apr-08 7:39
followait7-Apr-08 7:39 
GeneralRe: a problem when wait for a thread to be completed Pin
Mark Salsbery7-Apr-08 7:52
Mark Salsbery7-Apr-08 7:52 

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.