|
Scrolling a Bitmap with the WM_HSCROLL and WM_VSCROLL Messages
When the WM_HSCROLL and WM_VSCROLL messages are processed, the scroll bar notification message is examined and
the scrolling position is set to a new value that reflects the scrolling action
of the user. If the scrolling position is within the scrolling range, the
window is scrolled to the new position by using the ScrollWindow function. The position of the scroll box is then adjusted by using the SetScrollInfo function. In versions earlier than 4.0, use the SetScrollPos function.
After a window is scrolled, part of its client area is made invalid. To ensure
that the invalid region is updated, use the UpdateWindow function to generate a WM_PAINT message. When processing the WM_PAINT message, an application must repaint
the invalid region at the bottom of the client area. When scrolling or resizing
the client area, the example uses the BitBlt function to copy the appropriate portion of the bitmap to the invalid portion
of the client area.
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|