Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. SendMessage(WM_VSCROLL,SB_LINEDOWN,0) don't work

SendMessage(WM_VSCROLL,SB_LINEDOWN,0) don't work

Scheduled Pinned Locked Moved C / C++ / MFC
debuggingquestionlearning
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mesajflaviu
    wrote on last edited by
    #1

    I have an MDI application with CView based on CZoomView , based on CScrollView . In CMyView::OnKeyDown(...) I try follow :

    void CMyView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
    {
    // TODO: Add your message handler code here and/or call default

    int x = -1;
    switch(nChar)
    {
    case VK\_DOWN:
    	x = SendMessage(WM\_VSCROLL,SB\_LINEDOWN,(LPARAM)0);
    	TRACE("\\n %d \\n",x);
    	break;
    default:
    	break;
    }
    
    CZoomView::OnKeyDown(nChar, nRepCnt, nFlags);
    

    }

    the output of TRACE is 0 , but still the window scroll don't work ... why ? P.S. Of course , thw window have horizontal and vertical scroll .

    A 1 Reply Last reply
    0
    • M mesajflaviu

      I have an MDI application with CView based on CZoomView , based on CScrollView . In CMyView::OnKeyDown(...) I try follow :

      void CMyView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
      {
      // TODO: Add your message handler code here and/or call default

      int x = -1;
      switch(nChar)
      {
      case VK\_DOWN:
      	x = SendMessage(WM\_VSCROLL,SB\_LINEDOWN,(LPARAM)0);
      	TRACE("\\n %d \\n",x);
      	break;
      default:
      	break;
      }
      
      CZoomView::OnKeyDown(nChar, nRepCnt, nFlags);
      

      }

      the output of TRACE is 0 , but still the window scroll don't work ... why ? P.S. Of course , thw window have horizontal and vertical scroll .

      A Offline
      A Offline
      Adam Roderick J
      wrote on last edited by
      #2

      Whether CMyView is derived from CScrollView?

      Величие не Бога может быть недооценена.

      M 1 Reply Last reply
      0
      • A Adam Roderick J

        Whether CMyView is derived from CScrollView?

        Величие не Бога может быть недооценена.

        M Offline
        M Offline
        mesajflaviu
        wrote on last edited by
        #3

        Well , this is the project , with CMyView derived from CZoomView ... it will be a difference about this problem ?

        A 1 Reply Last reply
        0
        • M mesajflaviu

          Well , this is the project , with CMyView derived from CZoomView ... it will be a difference about this problem ?

          A Offline
          A Offline
          Adam Roderick J
          wrote on last edited by
          #4

          if CZoomView is derived from CScrollView then no problem.

          Величие не Бога может быть недооценена.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups