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. GetScrollBarCtrl( ) alternative api in win32.

GetScrollBarCtrl( ) alternative api in win32.

Scheduled Pinned Locked Moved C / C++ / MFC
jsonquestion
8 Posts 3 Posters 4 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.
  • Z Offline
    Z Offline
    zakkas2483
    wrote on last edited by
    #1

    Hi all, I wanted to know,that is Edit control's scroll bar enabled from win32 code?

    CPalliniC N Z 3 Replies Last reply
    0
    • Z zakkas2483

      Hi all, I wanted to know,that is Edit control's scroll bar enabled from win32 code?

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      What do you mean, exactly (Usually, when using Win32 API, you have the window handle of the scrollbar, to deal with)? :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      In testa che avete, signor di Ceprano?

      Z 1 Reply Last reply
      0
      • Z zakkas2483

        Hi all, I wanted to know,that is Edit control's scroll bar enabled from win32 code?

        N Offline
        N Offline
        Nibu babu thomas
        wrote on last edited by
        #3

        zakkas2483 wrote:

        I wanted to know,that is Edit control's scroll bar enabled from win32 code?

        bool IsVScrollEnabled( HWND hEdit ) { return (( ::GetWindowLong(hEdit, GWL_STYLE) & WS_VSCROLL ) == WS_VSCROLL ); } Same for hscroll, hope this helps?

        Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

        Z 1 Reply Last reply
        0
        • CPalliniC CPallini

          What do you mean, exactly (Usually, when using Win32 API, you have the window handle of the scrollbar, to deal with)? :)

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          Z Offline
          Z Offline
          zakkas2483
          wrote on last edited by
          #4

          I am having one Edit Control on my application and edit control having VScroll bar in disable mode. at one stage i need to know that this Vscroll is enabled or not? for that i need handle of VScroll bar. Thank You.

          modified on Friday, May 29, 2009 8:13 AM

          1 Reply Last reply
          0
          • N Nibu babu thomas

            zakkas2483 wrote:

            I wanted to know,that is Edit control's scroll bar enabled from win32 code?

            bool IsVScrollEnabled( HWND hEdit ) { return (( ::GetWindowLong(hEdit, GWL_STYLE) & WS_VSCROLL ) == WS_VSCROLL ); } Same for hscroll, hope this helps?

            Nibu babu thomas Microsoft MVP for VC++ Code must be written to be read, not by the compiler, but by another human being. Programming Blog: http://nibuthomas.wordpress.com

            Z Offline
            Z Offline
            zakkas2483
            wrote on last edited by
            #5

            Thank you.. I am having problem with the solution. Initially Edit control having v-scroll in disable mode. Your solution will give true even scroll bar is disable.

            1 Reply Last reply
            0
            • Z zakkas2483

              Hi all, I wanted to know,that is Edit control's scroll bar enabled from win32 code?

              Z Offline
              Z Offline
              zakkas2483
              wrote on last edited by
              #6

              I am having code in MFC. DWORD dwStyle = GetStyle(); CScrollBar* pBar = GetScrollBarCtrl(SB_VERT); bool bHasVertBar = ((pBar != NULL) && pBar->IsWindowEnabled()) || (dwStyle & WS_VSCROLL); I need same code in Win32. Probably this MFC code will help other to understand my question. Thank You.

              CPalliniC 1 Reply Last reply
              0
              • Z zakkas2483

                I am having code in MFC. DWORD dwStyle = GetStyle(); CScrollBar* pBar = GetScrollBarCtrl(SB_VERT); bool bHasVertBar = ((pBar != NULL) && pBar->IsWindowEnabled()) || (dwStyle & WS_VSCROLL); I need same code in Win32. Probably this MFC code will help other to understand my question. Thank You.

                CPalliniC Offline
                CPalliniC Offline
                CPallini
                wrote on last edited by
                #7

                Well, you may have a look at MFC source code... :)

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                [My articles]

                In testa che avete, signor di Ceprano?

                Z 1 Reply Last reply
                0
                • CPalliniC CPallini

                  Well, you may have a look at MFC source code... :)

                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                  [My articles]

                  Z Offline
                  Z Offline
                  zakkas2483
                  wrote on last edited by
                  #8

                  Thank you... :)

                  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