#10 Scroll-lock enables scrolling using pgup/pgdown and arrows

closed
nobody
None
5
2006-06-30
2006-06-30
jachymko_
No

modify the ConsoleView::OnConsoleFwdMsg method to look
like this:

LRESULT ConsoleView::OnConsoleFwdMsg
(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& /*bHand
led*/)
{
  if(uMsg == WM_KEYDOWN)
  {
    if((::GetKeyState(VK_SCROLL) & 0x1) == 0x1)
    {
      switch(wParam)
      {
        case VK_UP:   
          DoScroll(SB_VERT, SB_LINEUP, 0); 
          return 0;

case VK_PRIOR:  
          DoScroll(SB_VERT, SB_PAGEUP, 0); 
          return 0;

case VK_DOWN: 
          DoScroll(SB_VERT, SB_LINEDOWN, 0); 
          return 0;

        case VK_NEXT: 
          DoScroll(SB_VERT, SB_PAGEDOWN, 0); 
          return 0;

case VK_LEFT: 
          DoScroll(SB_HORZ, SB_LINELEFT, 0); 
          return 0;

        case VK_RIGHT:  
          DoScroll(SB_HORZ, SB_LINERIGHT, 0); 
          return 0;       
      }
    }
  }

::PostMessage(m_consoleHandler.GetConsoleParams()-
>hwndConsoleWindow, uMsg, wParam, lParam);
  return 0;
}  

Discussion

    • status: open --> closed
     
  • Logged In: YES
    user_id=16767

    Thanks!

    I've incorporated the code, it will be available in the next
    build.