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. How can i scroll mi Msflexgrid

How can i scroll mi Msflexgrid

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
8 Posts 3 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.
  • S Offline
    S Offline
    saravana001
    wrote on last edited by
    #1

    hi all, now i'm having a msflexgrid vth mi dialog.i could scroll inside mi dialog.but mi probs is that i couldn't scroll inside mi flexgrid using the mouse(scroller).can any one plz help mi in this regard. very thanks in advance. Saravana...

    C 1 Reply Last reply
    0
    • S saravana001

      hi all, now i'm having a msflexgrid vth mi dialog.i could scroll inside mi dialog.but mi probs is that i couldn't scroll inside mi flexgrid using the mouse(scroller).can any one plz help mi in this regard. very thanks in advance. Saravana...

      C Offline
      C Offline
      chandu004
      wrote on last edited by
      #2

      can you put your question a bit clearly?

      S 1 Reply Last reply
      0
      • C chandu004

        can you put your question a bit clearly?

        S Offline
        S Offline
        saravana001
        wrote on last edited by
        #3

        here is my clear question chandu.. i'm having a msflexgrid in my dialog.i want to scroll the flexgrid to and fro to view all the data using the mouse scroller(roller of the mouse).now my mouse scroller is not working inside the flexgrid.(they are now working only by cliking the buttons) thanks .... saravana.

        C A 3 Replies Last reply
        0
        • S saravana001

          here is my clear question chandu.. i'm having a msflexgrid in my dialog.i want to scroll the flexgrid to and fro to view all the data using the mouse scroller(roller of the mouse).now my mouse scroller is not working inside the flexgrid.(they are now working only by cliking the buttons) thanks .... saravana.

          C Offline
          C Offline
          chandu004
          wrote on last edited by
          #4

          now i got it. even i wanted to know how to do it. i can do it in some round about way using pretranslatemessage and sendmessage. but some r and D is required. lets see if any master gives a simple solution. otherwise, tomorrow i shall work it out and guide you.

          S 1 Reply Last reply
          0
          • C chandu004

            now i got it. even i wanted to know how to do it. i can do it in some round about way using pretranslatemessage and sendmessage. but some r and D is required. lets see if any master gives a simple solution. otherwise, tomorrow i shall work it out and guide you.

            S Offline
            S Offline
            saravana001
            wrote on last edited by
            #5

            Thats fine chandu....let us wait for a simple solution. Regards. Saravana..

            C 1 Reply Last reply
            0
            • S saravana001

              Thats fine chandu....let us wait for a simple solution. Regards. Saravana..

              C Offline
              C Offline
              chandu004
              wrote on last edited by
              #6

              are you aware of pretranslatemessage?

              1 Reply Last reply
              0
              • S saravana001

                here is my clear question chandu.. i'm having a msflexgrid in my dialog.i want to scroll the flexgrid to and fro to view all the data using the mouse scroller(roller of the mouse).now my mouse scroller is not working inside the flexgrid.(they are now working only by cliking the buttons) thanks .... saravana.

                A Offline
                A Offline
                alan93
                wrote on last edited by
                #7

                Ever heard the old saying.."you can't get there from here"? Well, it applies here if you are using CMSFlexGrid class as it does not support mouse scolling. This can be seen easily by looking in this class header msflexgrid.h. Why did you choose flex grid? There are other grid controls that support this , you may have to switch to those if you want this.

                1 Reply Last reply
                0
                • S saravana001

                  here is my clear question chandu.. i'm having a msflexgrid in my dialog.i want to scroll the flexgrid to and fro to view all the data using the mouse scroller(roller of the mouse).now my mouse scroller is not working inside the flexgrid.(they are now working only by cliking the buttons) thanks .... saravana.

                  C Offline
                  C Offline
                  chandu004
                  wrote on last edited by
                  #8

                  hai, i worked on your problem and arrived to this solution. here is the 5 lined logic to scroll the flex grid using the mouse wheel. 1.add the PreTranslateMessage event to your dialog. 2.in the pretranslate message, add the following code. if(pMsg->hwnd==m_g.m_hwnd)//m_g is your grid variable. { if(pMsg->message==WM_MOUSEWHEEL && pMsg->wParam==**4287102976**) m_g.SetTopRow(m_g.GetTopRow()+1); else if(pMsg->message==WM_MOUSEWHEEL && pMsg->wParam==**7864320** && m_g.GetTopRow()>1) m_g.SetTopRow(m_g.GetTopRow()-1); } 3.in the above logic, the values indicated in bold depends on the size of your grid on your dialog. 4.so, you have to find them out in debug mode. if you donot know how to find them out, then i can help you. 5.any more doubts also then you are welcome.

                  -------------------------------------------- Suggestion to the members: Please prefix your main thread subject with [SOLVED] if it is solved. thanks. chandu.

                  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