Click here to Skip to main content
16,004,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Animated GIF's as back ground under push buttons in MFC Pin
kishoresajja18-Jun-09 11:44
kishoresajja18-Jun-09 11:44 
QuestionConnecting Push buttons by arrow lines in MFC Form View Pin
kishoresajja17-Jun-09 13:48
kishoresajja17-Jun-09 13:48 
AnswerRe: Connecting Push buttons by arrow lines in MFC Form View Pin
«_Superman_»17-Jun-09 16:28
professional«_Superman_»17-Jun-09 16:28 
QuestionSOLVED MFC and F1 help [modified] Pin
Vaclav_17-Jun-09 13:29
Vaclav_17-Jun-09 13:29 
AnswerRe: MFC and F1 help Pin
Ozer Karaagac17-Jun-09 15:08
professionalOzer Karaagac17-Jun-09 15:08 
AnswerRe: MFC and F1 help Pin
Jijo.Raj17-Jun-09 20:50
Jijo.Raj17-Jun-09 20:50 
AnswerRe: MFC and F1 help Pin
chandu00417-Jun-09 21:10
chandu00417-Jun-09 21:10 
AnswerSOLVED MFC and F1 help using PreTranslateMessage [modified] Pin
Vaclav_18-Jun-09 9:10
Vaclav_18-Jun-09 9:10 
Found a solution thanks to the forum using PreTranslateMessage in CFormView. Also found Q222829 article very helpful but confusing. Is it really necessary to run TranslateAccelerator ? Also I do not see why Accelerator resource is also in the picture.


Addendum - Apparently it is necessary to use TranslateAccelerator and other functions when the accelerator key is in menu.




I am including (for review only – it is redundant) two ways to retrieve the VK_F2 (function key F2 ) , they both accomplish same result.

Of course the de-reference symbol is as always “->” and not “->”. I really do not know why, but is it not my mistake!

Thanks guys Vaclav

BOOL CFD2008View::PreTranslateMessage(MSG* pMsg)
{
     // TRACE("\n BOOL CFD2008View::PreTranslateMessage(MSG* pMsg) ");
    
   if (m_hAccelTable) {
         if (::TranslateAccelerator(m_hWnd, m_hAccelTable, pMsg)) {
             {
         if(pMsg->wParam==VK_F2)
               {
                    TRACE("\nBOOL CFD2008View::PreTranslateMessage(MSG* pMsg)   VK_F2");
                    m_edit.SetFocus();

               }
            return(TRUE);
             }

         }
   }
    
     if(pMsg->message == WM_KEYDOWN)
     {
                 if(pMsg->wParam==VK_F2)
               {
                    TRACE("\nBOOL CFD2008View::PreTranslateMessage(MSG* pMsg)   VK_F2");
                    m_edit.SetFocus();

               }

     }
    

     {
          // Let the ToolTip process this message.
          m_tooltip.RelayEvent(pMsg);
     }
    
     return CFormView::PreTranslateMessage(pMsg);
}

modified on Thursday, June 18, 2009 3:40 PM

QuestionAlias an Array of Pointers Pin
Skippums17-Jun-09 11:00
Skippums17-Jun-09 11:00 
AnswerRe: Alias an Array of Pointers Pin
Ozer Karaagac17-Jun-09 11:44
professionalOzer Karaagac17-Jun-09 11:44 
AnswerRe: Alias an Array of Pointers Pin
Stuart Dootson17-Jun-09 12:15
professionalStuart Dootson17-Jun-09 12:15 
Questionsmart pointers Pin
siva45517-Jun-09 8:19
siva45517-Jun-09 8:19 
AnswerRe: smart pointers Pin
CPallini17-Jun-09 9:03
mveCPallini17-Jun-09 9:03 
AnswerRe: smart pointers Pin
Stuart Dootson17-Jun-09 9:54
professionalStuart Dootson17-Jun-09 9:54 
QuestionATL Server Web Service on Vista / IIS 7 and VS2005 Pin
Condorito17-Jun-09 7:53
Condorito17-Jun-09 7:53 
QuestionUser detailes from Outlook Pin
kasi1417-Jun-09 6:52
kasi1417-Jun-09 6:52 
AnswerRe: User detailes from Outlook Pin
Stuart Dootson17-Jun-09 7:15
professionalStuart Dootson17-Jun-09 7:15 
Questioncoding related to mac address Pin
amitkalani117-Jun-09 5:29
amitkalani117-Jun-09 5:29 
QuestionScrollbar in CStatic derived class Pin
kk.tvm17-Jun-09 2:34
kk.tvm17-Jun-09 2:34 
QuestionRe: Scrollbar in CStatic derived class Pin
David Crow17-Jun-09 2:39
David Crow17-Jun-09 2:39 
AnswerRe: Scrollbar in CStatic derived class Pin
kk.tvm17-Jun-09 20:53
kk.tvm17-Jun-09 20:53 
GeneralRe: Scrollbar in CStatic derived class Pin
chandu00418-Jun-09 0:46
chandu00418-Jun-09 0:46 
AnswerRe: Scrollbar in CStatic derived class Pin
KarstenK17-Jun-09 2:59
mveKarstenK17-Jun-09 2:59 
Questionsocket programming using vc++ Pin
rahuljin17-Jun-09 1:35
rahuljin17-Jun-09 1:35 
AnswerRe: socket programming using vc++ Pin
Garth J Lancaster17-Jun-09 2:14
professionalGarth J Lancaster17-Jun-09 2:14 

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.