15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


How to create a scrolling area inside a view

David Ellis -- David_Ellis_at_ACE420@mail.hq.faa.gov
Monday, July 29, 1996

     Environment: VC 1.52, Win 3.1
        
     I am trying to create a scrolling area inside a CRecordView that will 
     contain 4 large edit controls.  All together they will be about twice 
     the width of the area I want them to be in.  I want to be able to 
     scroll them horizontally independent of the main view.
     
     Can anyone point me to the correct way to do this, or tell me where I 
     can find an example of something like this?  I just need a general 
     outline so I can see where I may be going wrong, though specifics 
     would be welcome (and examples more so).
     
     Replies may be sent directly to me if desired.
     
     David Ellis
     David_Ellis_At_ACE420@mail.hq.faa.gov




Mike Blaszczak -- mikeblas@nwlink.com
Saturday, August 03, 1996

At 01:06 PM 7/29/96 EST, you wrote:
>     Environment: VC 1.52, Win 3.1
>     I am trying to create a scrolling area inside a CRecordView that will 
>     contain 4 large edit controls.  All together they will be about twice 
>     the width of the area I want them to be in.  I want to be able to 
>     scroll them horizontally independent of the main view.

You should think about scrolling the controls and not "an area" of your
window.  You could just call MoveWindow() on each of the four windows
every time somebody touches your scroll bar.

>     Can anyone point me to the correct way to do this, or tell me where I 
>     can find an example of something like this?  I just need a general 
>     outline so I can see where I may be going wrong, though specifics 

Calling MoveWindow() will do just that for each window.  It's better to
call BeginDeferWindowPos(), DeferWindowPos(), and EndDeferWindowPos() so
that things don't look ugly as they repaint little by little.

>     would be welcome (and examples more so).

I guess I could whip out code that does this, but I'm not going to write
any sixteen-bit samples.
     
>     Replies may be sent directly to me if desired.

I'd rather see everyone on the list benefit from answers.
.B ekiM
http://www.nwlink.com/~mikeblas/
These words are my own. I do not speak on behalf of Microsoft.





| Вернуться в корень Архива |