Click here to Skip to main content
15,918,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: I really need to know this.... Pin
dabs19-Sep-02 2:13
dabs19-Sep-02 2:13 
GeneralRe: I really need to know this.... Pin
ns19-Sep-02 2:27
ns19-Sep-02 2:27 
GeneralRe: I really need to know this.... Pin
Arjan Schouten19-Sep-02 3:23
Arjan Schouten19-Sep-02 3:23 
Generalavoid to close the property sheet when the user press return, handling return key in a ListCtrl... Pin
Joan M19-Sep-02 1:01
professionalJoan M19-Sep-02 1:01 
GeneralRe: avoid to close the property sheet when the user press return, handling return key in a ListCtrl... Pin
Arjan Schouten19-Sep-02 1:12
Arjan Schouten19-Sep-02 1:12 
GeneralRe: avoid to close the property sheet when the user press return, handling return key in a ListCtrl... Pin
Steve S19-Sep-02 1:48
Steve S19-Sep-02 1:48 
GeneralRe: avoid to close the property sheet when the user press return, handling return key in a ListCtrl... Pin
Joan M19-Sep-02 3:55
professionalJoan M19-Sep-02 3:55 
GeneralRe: avoid to close the property sheet when the user press return, handling return key in a ListCtrl... Pin
Steve S19-Sep-02 4:40
Steve S19-Sep-02 4:40 
Ah. What I meant was that you detect that the input message is aimed at your edit window, and send the message normally (there are different ways to do this) before returning TRUE.


if (pMsg->message == WM_KEYDOWN &&
pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE)
{
CEdit* edit = m_TreeCtrl.GetEditControl();
if (edit)
{
edit->SendMessage(WM_KEYDOWN, pMsg->wParam, pMsg->lParam);
return TRUE;
}
}

You can also replace the SendMessage with
::TranslateMessage(pMsg);
::DispatchMessage(pMsg);
if you want to.

This should work as you require.

Sorry for any confusion.



Steve S
[This signature space available for rent]
GeneralRe: avoid to close the property sheet when the user press return, handling return key in a ListCtrl... Pin
Joan M19-Sep-02 5:10
professionalJoan M19-Sep-02 5:10 
Questionconvert CString to a _bstr_t - how to? Pin
ns19-Sep-02 1:00
ns19-Sep-02 1:00 
AnswerRe: convert CString to a _bstr_t - how to? Pin
dabs19-Sep-02 1:25
dabs19-Sep-02 1:25 
GeneralRe: convert CString to a _bstr_t - how to? Pin
ns19-Sep-02 1:31
ns19-Sep-02 1:31 
GeneralRe: convert CString to a _bstr_t - how to? Pin
ns19-Sep-02 1:32
ns19-Sep-02 1:32 
GeneralRe: convert CString to a _bstr_t - how to? Pin
dabs19-Sep-02 1:39
dabs19-Sep-02 1:39 
AnswerRe: convert CString to a _bstr_t - how to? Pin
Trollslayer19-Sep-02 1:42
mentorTrollslayer19-Sep-02 1:42 
GeneralRe: convert CString to a _bstr_t - how to? Pin
ns19-Sep-02 1:53
ns19-Sep-02 1:53 
GeneralRe: convert CString to a _bstr_t - how to? Pin
dabs19-Sep-02 1:58
dabs19-Sep-02 1:58 
GeneralRe: convert CString to a _bstr_t - how to? Pin
ns19-Sep-02 2:13
ns19-Sep-02 2:13 
GeneralRe: convert CString to a _bstr_t - how to? Pin
dabs19-Sep-02 2:17
dabs19-Sep-02 2:17 
Generalaaargh!! Pin
ns19-Sep-02 2:32
ns19-Sep-02 2:32 
GeneralI think I might have got it.... Pin
ns19-Sep-02 3:04
ns19-Sep-02 3:04 
GeneralRe: convert CString to a _bstr_t - how to? Pin
ns19-Sep-02 7:32
ns19-Sep-02 7:32 
Generalhandle Pin
Anonymous19-Sep-02 0:33
Anonymous19-Sep-02 0:33 
GeneralRe: handle Pin
super19-Sep-02 1:08
professionalsuper19-Sep-02 1:08 
GeneralRe: handle Pin
dabs19-Sep-02 1:33
dabs19-Sep-02 1:33 

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.