Click here to Skip to main content
15,882,388 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Accelerator key issue Pin
David Crow17-Apr-12 7:44
David Crow17-Apr-12 7:44 
GeneralRe: Accelerator key issue Pin
jkirkerx17-Apr-12 8:30
professionaljkirkerx17-Apr-12 8:30 
GeneralRe: Accelerator key issue Pin
David Crow17-Apr-12 9:31
David Crow17-Apr-12 9:31 
GeneralRe: Accelerator key issue Pin
jkirkerx17-Apr-12 10:02
professionaljkirkerx17-Apr-12 10:02 
GeneralRe: Accelerator key issue Pin
David Crow17-Apr-12 17:47
David Crow17-Apr-12 17:47 
GeneralRe: Accelerator key issue Pin
jkirkerx17-Apr-12 18:23
professionaljkirkerx17-Apr-12 18:23 
GeneralRe: Accelerator key issue Pin
David Crow18-Apr-12 2:04
David Crow18-Apr-12 2:04 
GeneralRe: Accelerator key issue Pin
jkirkerx18-Apr-12 6:27
professionaljkirkerx18-Apr-12 6:27 
I had the problem where the Alt-X worked for Exit, but my Alt-F5 work not do anything.

I loaded the accelerators,

//Accelerators
HACCEL hAccelTable_Main, hAccelTable_Keys;
hAccelTable_Main = LoadAccelerators( hInstance, MAKEINTRESOURCE( IDR_NASE2012_SUWIZARD ));
hAccelTable_Keys = LoadAccelerators( hInstance, MAKEINTRESOURCE( IDA_KEYBOARD_ACCELERATORS ));


And then I realized I had to capture the messages. So now both sets of accelerators work concurrently.

C#
// Main message loop:
    while ((bReturn = GetMessage(&msg, NULL, 0, 0)) !=0) {
        if (bReturn == -1) {
            // Handle the error and possibly exit

        }
        else {
            if (( !TranslateAccelerator( g_hWndMainFrame, hAccelTable_Main, &msg )) && ( !TranslateAccelerator( g_hWndMainFrame, hAccelTable_Keys, &msg ))) {
                TranslateMessage(&msg);
                DispatchMessage(&msg);
            }
        }
    }

GeneralRe: Accelerator key issue Pin
David Crow18-Apr-12 7:11
David Crow18-Apr-12 7:11 
GeneralRe: Accelerator key issue Pin
jkirkerx18-Apr-12 8:48
professionaljkirkerx18-Apr-12 8:48 
QuestionHow do I include code in debug build but exclude from release build? Pin
pdC++16-Apr-12 5:25
pdC++16-Apr-12 5:25 
AnswerRe: How do I include code in debug build but exclude from release build? Pin
Albert Holguin16-Apr-12 5:29
professionalAlbert Holguin16-Apr-12 5:29 
AnswerRe: How do I include code in debug build but exclude from release build? Pin
pdC++16-Apr-12 8:03
pdC++16-Apr-12 8:03 
Questionvs 2008 to vs2010 Pin
columbos1492716-Apr-12 3:57
columbos1492716-Apr-12 3:57 
AnswerRe: vs 2008 to vs2010 Pin
Pete O'Hanlon16-Apr-12 4:07
mvePete O'Hanlon16-Apr-12 4:07 
AnswerRe: vs 2008 to vs2010 Pin
Albert Holguin16-Apr-12 4:41
professionalAlbert Holguin16-Apr-12 4:41 
GeneralRe: vs 2008 to vs2010 Pin
Binu MD16-Apr-12 21:09
Binu MD16-Apr-12 21:09 
GeneralRe: vs 2008 to vs2010 Pin
Richard MacCutchan16-Apr-12 22:05
mveRichard MacCutchan16-Apr-12 22:05 
GeneralRe: vs 2008 to vs2010 Pin
Pete O'Hanlon16-Apr-12 22:06
mvePete O'Hanlon16-Apr-12 22:06 
GeneralRe: vs 2008 to vs2010 Pin
Binu MD17-Apr-12 15:28
Binu MD17-Apr-12 15:28 
Answerjust for info Pin
Nelek17-Apr-12 14:19
protectorNelek17-Apr-12 14:19 
AnswerRe: vs 2008 to vs2010 Pin
Binu MD17-Apr-12 15:28
Binu MD17-Apr-12 15:28 
Questionwhat do you whink should be my next step as MFC developer? Pin
Hernan Breinbauer16-Apr-12 2:32
Hernan Breinbauer16-Apr-12 2:32 
AnswerRe: what do you whink should be my next step as MFC developer? Pin
CPallini16-Apr-12 2:55
mveCPallini16-Apr-12 2:55 
AnswerRe: what do you whink should be my next step as MFC developer? Pin
Aescleal16-Apr-12 3:36
Aescleal16-Apr-12 3:36 

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.