Click here to Skip to main content
15,921,959 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionw32 api (hooking) : Problem with GetProcAddress and callback (__stdcall) function Pin
INA_ctive16-Dec-05 0:53
INA_ctive16-Dec-05 0:53 
AnswerRe: w32 api (hooking) : Problem with GetProcAddress and callback (__stdcall) function Pin
James Brown16-Dec-05 1:02
James Brown16-Dec-05 1:02 
GeneralRe: w32 api (hooking) : Problem with GetProcAddress and callback (__stdcall) function Pin
INA_ctive16-Dec-05 1:50
INA_ctive16-Dec-05 1:50 
AnswerRe: w32 api (hooking) : Problem with GetProcAddress and callback (__stdcall) function Pin
Blake Miller16-Dec-05 4:55
Blake Miller16-Dec-05 4:55 
QuestionRich Edit Control Pin
ZaebanB16-Dec-05 0:48
ZaebanB16-Dec-05 0:48 
AnswerRe: Rich Edit Control Pin
Arman S.16-Dec-05 1:40
Arman S.16-Dec-05 1:40 
GeneralRe: Rich Edit Control Pin
ZaebanB16-Dec-05 1:46
ZaebanB16-Dec-05 1:46 
AnswerRe: Rich Edit Control Pin
Mark F.23-Dec-05 10:49
Mark F.23-Dec-05 10:49 
Is your RichEditCtrl a control in a CDialog or a CRichEditView? As a control you will need to use PreTranslateMessage() to trap the shift+enter keys (VK_SHIFT, VK_RETURN) or the dialog will close via the default button (usually CDialog::OnOK()).
<code>BOOL CSampleControl::PreTranslateMessage(LPMSG lpmsg)
{
    BOOL bHandleNow = FALSE;

    switch (lpmsg->message)
    {
    case WM_KEYDOWN:
        switch (lpmsg->wParam)
        {
        case VK_UP:
        case VK_DOWN:
        case VK_LEFT:
        case VK_RIGHT:
            bHandleNow = TRUE;
            break;
        }
        if (bHandleNow)
            OnKeyDown(lpmsg->wParam, LOWORD(lpmsg 
                ->lParam), HIWORD(lpmsg->lParam));
        break;
    }
    return bHandleNow;
}
</code> - Source: MSDN Help Documentation.
In a CRichEditView class the RichEditCtrl will respond to a SHIFT+VK_RETURN keyboard event and insert a soft carriage return (\par). If you hit the enter key (VK_RETURN event), it inserts a hard return (\par\par). This is, if your document class serializes as richtext.
CRichEditDoc::m_bRTF = TRUE;
If you are serializing as text then you can insert a newline character with
GetRichEditCtrl().ReplaceSel("\n");
In both cases of serialization the RichEditCtrl responds to the (SHIFT+ENTER)keyboard event the same.

Post a litle more info on what you are trying to do.

Mark
QuestionNetworking Pin
Girish60116-Dec-05 0:25
Girish60116-Dec-05 0:25 
AnswerRe: Networking Pin
VikramDelhi16-Dec-05 4:51
VikramDelhi16-Dec-05 4:51 
AnswerRe: Networking Pin
ThatsAlok16-Dec-05 21:58
ThatsAlok16-Dec-05 21:58 
QuestionCString and STL's string Pin
Putta_V16-Dec-05 0:22
Putta_V16-Dec-05 0:22 
AnswerRe: CString and STL's string Pin
David Crow16-Dec-05 2:48
David Crow16-Dec-05 2:48 
GeneralRe: CString and STL's string Pin
Rage16-Dec-05 4:27
professionalRage16-Dec-05 4:27 
GeneralRe: CString and STL's string Pin
David Crow16-Dec-05 4:38
David Crow16-Dec-05 4:38 
GeneralRe: CString and STL's string Pin
Rage20-Dec-05 6:34
professionalRage20-Dec-05 6:34 
AnswerRe: CString and STL's string Pin
Rage16-Dec-05 4:24
professionalRage16-Dec-05 4:24 
Questionopen a default fil by using the CFileDialog class Pin
vikas amin16-Dec-05 0:16
vikas amin16-Dec-05 0:16 
AnswerRe: open a default fil by using the CFileDialog class Pin
Russell'16-Dec-05 0:26
Russell'16-Dec-05 0:26 
GeneralRe: open a default fil by using the CFileDialog class Pin
vikas amin16-Dec-05 1:31
vikas amin16-Dec-05 1:31 
GeneralRe: open a default fil by using the CFileDialog class Pin
Russell'16-Dec-05 2:02
Russell'16-Dec-05 2:02 
GeneralRe: open a default fil by using the CFileDialog class Pin
vikas amin16-Dec-05 2:29
vikas amin16-Dec-05 2:29 
GeneralRe: open a default fil by using the CFileDialog class Pin
Russell'16-Dec-05 2:52
Russell'16-Dec-05 2:52 
GeneralRe: open a default fil by using the CFileDialog class Pin
vikas amin16-Dec-05 3:41
vikas amin16-Dec-05 3:41 
QuestionRe: open a default fil by using the CFileDialog class Pin
David Crow16-Dec-05 4:50
David Crow16-Dec-05 4:50 

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.