Click here to Skip to main content
15,905,414 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CArray template class Pin
Chris Losinger15-Oct-02 20:25
professionalChris Losinger15-Oct-02 20:25 
GeneralRe: CArray template class Pin
Richard Lewis15-Oct-02 20:33
Richard Lewis15-Oct-02 20:33 
GeneralRe: CArray template class Pin
Christian Graus15-Oct-02 21:25
protectorChristian Graus15-Oct-02 21:25 
GeneralRe: CArray template class Pin
Holger Persch15-Oct-02 20:37
Holger Persch15-Oct-02 20:37 
GeneralRe: CArray template class Pin
Richard Lewis15-Oct-02 20:47
Richard Lewis15-Oct-02 20:47 
GeneralRe: CArray template class Pin
Tomasz Sowinski15-Oct-02 23:52
Tomasz Sowinski15-Oct-02 23:52 
GeneralRe: CArray template class Pin
Holger Persch16-Oct-02 3:23
Holger Persch16-Oct-02 3:23 
GeneralPreTranslateMessage Pin
paulb15-Oct-02 14:06
paulb15-Oct-02 14:06 
I am trying to use PreTranslateMessage to translate a key press into a button click message. This is the code but it aint working:

<br />
BOOL CMScaleDlg::PreTranslateMessage(MSG* pMsg)<br />
{<br />
  if (pMsg->message == WM_KEYDOWN)<br />
  {<br />
    if (pMsg->wParam == VK_F2)<br />
    {<br />
      // Convert it into a button click message.<br />
      pMsg->message = WM_COMMAND;<br />
      pMsg->wParam = BN_CLICKED;<br />
      pMsg->lParam = (LPARAM) ::GetDlgItem(GetSafeHwnd(), IDC_BUTTON1);<br />
    }<br />
  }<br />
  return CDialog::PreTranslateMessage(pMsg);<br />
}<br />



The code which modifies the pMsg is being executed but nothing happens.
GeneralRe: PreTranslateMessage Pin
PJ Arends15-Oct-02 14:35
professionalPJ Arends15-Oct-02 14:35 
GeneralRe: PreTranslateMessage Pin
paulb15-Oct-02 14:53
paulb15-Oct-02 14:53 
GeneralRe: PreTranslateMessage Pin
Michael Dunn15-Oct-02 19:38
sitebuilderMichael Dunn15-Oct-02 19:38 
GeneralHelp needed! Pin
MFC is the Best15-Oct-02 12:19
MFC is the Best15-Oct-02 12:19 
GeneralRe: Help needed! Pin
Christian Graus15-Oct-02 12:27
protectorChristian Graus15-Oct-02 12:27 
GeneralRe: Help needed! Pin
MFC is the Best15-Oct-02 12:40
MFC is the Best15-Oct-02 12:40 
GeneralRe: Help needed! Pin
Christian Graus15-Oct-02 12:47
protectorChristian Graus15-Oct-02 12:47 
GeneralRe: Help needed! Pin
MFC is the Best15-Oct-02 12:49
MFC is the Best15-Oct-02 12:49 
GeneralRe: Help needed! Pin
Christian Graus15-Oct-02 12:57
protectorChristian Graus15-Oct-02 12:57 
GeneralRe: Help needed! Pin
MFC is the Best15-Oct-02 12:58
MFC is the Best15-Oct-02 12:58 
QuestionHow do i create a progressbar in my application? Pin
Anonymous15-Oct-02 12:12
Anonymous15-Oct-02 12:12 
AnswerRe: How do i create a progressbar in my application? Pin
valikac15-Oct-02 15:05
valikac15-Oct-02 15:05 
AnswerRe: How do i create a progressbar in my application? Pin
Michael Dunn15-Oct-02 19:41
sitebuilderMichael Dunn15-Oct-02 19:41 
GeneralSetScrollBarPos() problems Pin
dazinith15-Oct-02 10:54
dazinith15-Oct-02 10:54 
GeneralRe: SetScrollBarPos() problems Pin
alex.barylski15-Oct-02 19:44
alex.barylski15-Oct-02 19:44 
GeneralRe: SetScrollBarPos() problems Pin
dazinith16-Oct-02 3:22
dazinith16-Oct-02 3:22 
GeneralRe: SetScrollBarPos() problems Pin
alex.barylski16-Oct-02 15:41
alex.barylski16-Oct-02 15:41 

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.