Click here to Skip to main content
15,885,309 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Implementing a mathematical PI control for a reasonable "if" structure Pin
markkuk18-Aug-21 20:18
markkuk18-Aug-21 20:18 
GeneralRe: Implementing a mathematical PI control for a reasonable "if" structure Pin
Md Mubdiul Hasan 18-Aug-21 20:46
Md Mubdiul Hasan 18-Aug-21 20:46 
AnswerRe: Implementing a mathematical PI control for a reasonable "if" structure Pin
Richard MacCutchan18-Aug-21 22:19
mveRichard MacCutchan18-Aug-21 22:19 
QuestionHandling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
ForNow30-Jul-21 4:07
ForNow30-Jul-21 4:07 
AnswerRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Graham Breach30-Jul-21 4:40
Graham Breach30-Jul-21 4:40 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
ForNow30-Jul-21 5:59
ForNow30-Jul-21 5:59 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Graham Breach30-Jul-21 6:29
Graham Breach30-Jul-21 6:29 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
ForNow30-Jul-21 7:23
ForNow30-Jul-21 7:23 
thanks if so this code by Nish
BOOL CPreTransTestApp::ProcessMessageFilter(int code, LPMSG lpMsg) 
{
    if(m_haccel)
    {
        if (::TranslateAccelerator(m_pMainWnd->m_hWnd, m_haccel, lpMsg)) 
            return(TRUE);
    }
	
    return CWinApp::ProcessMessageFilter(code, lpMsg);
}
is incorrect

this code from Microsoft docs is correct
MSG msg;
BOOL bRet;

while ( (bRet = GetMessage(&msg, (HWND) NULL, 0, 0)) != 0)
{
    if (bRet == -1) 
    {
        // handle the error and possibly exit
    }
    else
    { 
        // Check for accelerator keystrokes. 
     
        if (!TranslateAccelerator( 
                hwndMain,      // handle to receiving window 
                haccel,        // handle to active accelerator table 
                &msg))         // message data 
        {
            TranslateMessage(&msg); 
            DispatchMessage(&msg); 
        } 
    } 
}

as it has not TranlateAccelterator wouldnt you agree
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Graham Breach30-Jul-21 8:17
Graham Breach30-Jul-21 8:17 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
ForNow30-Jul-21 8:28
ForNow30-Jul-21 8:28 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Graham Breach30-Jul-21 8:49
Graham Breach30-Jul-21 8:49 
AnswerRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Richard MacCutchan30-Jul-21 4:56
mveRichard MacCutchan30-Jul-21 4:56 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
ForNow30-Jul-21 5:11
ForNow30-Jul-21 5:11 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Richard MacCutchan30-Jul-21 5:28
mveRichard MacCutchan30-Jul-21 5:28 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Dave Kreskowiak30-Jul-21 6:10
mveDave Kreskowiak30-Jul-21 6:10 
GeneralRe: Handling KeyBoard messages/accelerators handling in MFC dialog based applications Pin
Richard MacCutchan30-Jul-21 6:15
mveRichard MacCutchan30-Jul-21 6:15 
QuestionDynamically creating CToolBar Pin
Benjamin Bruno30-Jul-21 3:54
Benjamin Bruno30-Jul-21 3:54 
AnswerRe: Dynamically creating CToolBar Pin
Richard MacCutchan30-Jul-21 4:52
mveRichard MacCutchan30-Jul-21 4:52 
QuestionRGB image to CMYK gdi+ Pin
Gopi Nath15-Jul-21 22:25
Gopi Nath15-Jul-21 22:25 
AnswerRe: RGB image to CMYK gdi+ Pin
Richard MacCutchan17-Jul-21 6:15
mveRichard MacCutchan17-Jul-21 6:15 
AnswerRe: RGB image to CMYK gdi+ Pin
RedDk16-Oct-21 8:24
RedDk16-Oct-21 8:24 
QuestionException handler Pin
Drugodrf14-Jul-21 6:39
Drugodrf14-Jul-21 6:39 
AnswerRe: Exception handler Pin
Greg Utas14-Jul-21 9:15
professionalGreg Utas14-Jul-21 9:15 
AnswerRe: Exception handler Pin
SeeSharp214-Jul-21 10:31
SeeSharp214-Jul-21 10:31 
GeneralRe: Exception handler Pin
Drugodrf15-Jul-21 6:15
Drugodrf15-Jul-21 6:15 

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.