Click here to Skip to main content
15,894,405 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ineed a source code before this friday Pin
molesworth21-May-09 4:31
molesworth21-May-09 4:31 
GeneralRe: ineed a source code before this friday Pin
jeron121-May-09 4:50
jeron121-May-09 4:50 
GeneralRe: ineed a source code before this friday Pin
CPallini21-May-09 7:04
mveCPallini21-May-09 7:04 
GeneralRe: ineed a source code before this friday Pin
bulg21-May-09 11:41
bulg21-May-09 11:41 
AnswerRe: ineed a source code before this friday Pin
Stuart Dootson21-May-09 4:37
professionalStuart Dootson21-May-09 4:37 
Question880231 - overriding keyboard behaviour Pin
ilostmyid221-May-09 1:11
professionalilostmyid221-May-09 1:11 
AnswerRe: 880231 - overriding keyboard behaviour Pin
jeron121-May-09 5:18
jeron121-May-09 5:18 
AnswerRe: 880231 - overriding keyboard behaviour Pin
Stuart Dootson21-May-09 5:36
professionalStuart Dootson21-May-09 5:36 
The other way to do it would be to replicate Windows tab-handling for VK_UP and VK_DOWN in the PreTranslateMessage method...

BOOL CtestmfcDlg::PreTranslateMessage(MSG* pMsg)
{
   if (pMsg->message == WM_KEYDOWN)
   {
      if (pMsg->wParam == VK_UP)
      {
         CWnd* prev = GetFocus()->GetNextWindow(GW_HWNDPREV);
         if (!prev) prev = GetFocus()->GetNextWindow(GW_HWNDLAST);
         if (prev) prev->SetFocus();
         return TRUE;
      }
      else if (pMsg->wParam == VK_DOWN)
      {
         CWnd* next = GetFocus()->GetNextWindow(GW_HWNDNEXT);
         if (!next) next = GetFocus()->GetNextWindow(GW_HWNDFIRST);
         if (next) next->SetFocus();
         return TRUE;
      }
   }

   return CDialog::PreTranslateMessage(pMsg);
}


(tested with VS2010 Beta 1 - woo-hoo!)

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: 880231 - overriding keyboard behaviour Pin
ilostmyid224-May-09 1:04
professionalilostmyid224-May-09 1:04 
GeneralRe: 880231 - overriding keyboard behaviour Pin
ilostmyid224-May-09 1:23
professionalilostmyid224-May-09 1:23 
GeneralRe: 880231 - overriding keyboard behaviour Pin
Stuart Dootson24-May-09 1:46
professionalStuart Dootson24-May-09 1:46 
GeneralRe: 880231 - overriding keyboard behaviour Pin
ilostmyid224-May-09 3:17
professionalilostmyid224-May-09 3:17 
GeneralRe: 880231 - overriding keyboard behaviour Pin
ilostmyid224-May-09 5:56
professionalilostmyid224-May-09 5:56 
QuestionHow to Create and format partitions Pin
Madan Chauhan20-May-09 23:45
Madan Chauhan20-May-09 23:45 
AnswerRe: How to Create and format partitions Pin
C++myLife21-May-09 0:52
C++myLife21-May-09 0:52 
GeneralRe: How to Create and format partitions Pin
Madan Chauhan21-May-09 1:11
Madan Chauhan21-May-09 1:11 
GeneralRe: How to Create and format partitions Pin
C++myLife21-May-09 1:49
C++myLife21-May-09 1:49 
GeneralRe: How to Create and format partitions Pin
Madan Chauhan21-May-09 22:17
Madan Chauhan21-May-09 22:17 
AnswerRe: How to Create and format partitions Pin
Hamid_RT21-May-09 2:26
Hamid_RT21-May-09 2:26 
GeneralRe: How to Create and format partitions Pin
Stephen Hewitt21-May-09 4:00
Stephen Hewitt21-May-09 4:00 
GeneralRe: How to Create and format partitions Pin
C++myLife21-May-09 20:44
C++myLife21-May-09 20:44 
GeneralRe: How to Create and format partitions Pin
Madan Chauhan21-May-09 22:22
Madan Chauhan21-May-09 22:22 
QuestionCreate CBitmap from array of RGB values Pin
sashoalm20-May-09 23:00
sashoalm20-May-09 23:00 
AnswerRe: Create CBitmap from array of RGB values Pin
Russell'20-May-09 23:52
Russell'20-May-09 23:52 
GeneralRe: Create CBitmap from array of RGB values Pin
sashoalm21-May-09 5:04
sashoalm21-May-09 5:04 

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.