CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999
    Posts
    19

    Adding scrollbars on a very large dialog box

    Is it possible to add scrollbars to a dialog box wich is larger than the actual screen.


    ###
    #####
    #######
    #####
    \\\|/// ###
    | ~ ~ | #
    (- * * -) #
    ------------oOOo-(_)-oO#o-----------
    | #
    ^ #
    " #
    ##



  2. #2
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: Adding scrollbars on a very large dialog box

    Possible, but tricky. If you add scrollbar controls in the Resource Editor as with any other control, you would have to set the total size of the dialogue area to be covered (i.e., tell the scrollbars how far they go - SetScrollRange() ), then handle the WM_VSCROLL and WM_HSCROLL messages, then move all controls on the dialogue box around according to the current scroll position, as well as any painting you do directly onto the dialogue box.

    Not for the faint-hearted. If you have that much data to display, you should think about property sheets (= multi-page dialogue).

    Still wanna do it? E-mail me ([email protected]) and I'll knock up a demo.



    --
    Jason Teagle
    [email protected]

  3. #3
    Join Date
    May 1999
    Posts
    19

    Re: Adding scrollbars on a very large dialog box

    Thanks for the tip,

    far too triky for me...yet
    I won't do it that way then ==> i.e I'll just go through a normal CScrollView.

    Thanks again,


    ###
    #####
    #######
    #####
    \\\|/// ###
    | ~ ~ | #
    (- * * -) #
    ------------oOOo-(_)-oO#o-----------
    | #
    ^ #
    " #
    ##



  4. #4
    Join Date
    Apr 1999
    Location
    Chennai, India
    Posts
    48

    Re: Adding scrollbars on a very large dialog box

    check CFormView. It does exactly what u want !

    happy dialog scrolling !



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured