Window Message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

To display the vertical scroll bar of any control (Print Preview Control in perticular)which window message is set?
pls guide
 
Hi,

As far as I remember, in plain Windows API certain bits in either class
style or window style were used to indicate whether the window should have
horizontal/vertical scroll bars. These can be altered through
SetClassLong/SetWindowLong after the window has been created, but this only
controls the visibility of the scroll bars, the window should still react on
WM_HSCROLL and WM_VSCROLL to make the scroll bars "live" (as well as the
window should correctly initialize the scrollbars' min/max values).

As for the PrintPreview control, I remember it displays the scroll bar
automatically when necessary. Could you please elaborate on what exactly
behavior you want to implement? Do you want to make the scroll bar always
visible, even when there's nothing to scroll?

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

Sachin said:
To display the vertical scroll bar of any control (Print Preview Control
in perticular)which window message is set?
 
Thanks for the reply.
Let me explain my problem in detail.
I am trying to make customized Print Preview Dialog using Print Preview Control.

1. I want to display the document in AutoZoom initially thats not the big issue and would like to display Vertical scroll bar by defaulf so that I can hook up its scroll up/down to page previous/next action. Its very similar to the original Print Preview Dialog. When we enlarge the document and it does not fit in to the display area, both the scroll bar appear automatically and used to scroll over the displayed page only, which is default functionality of the control.

2. I want to calculate the area in which document gets displayed, so that I can change the cursor on the document only and not over the gray area inside the Print Preview Control. Also on clicking the document, I would like to zoom in/out the page. But how to sense clicking on the document? The situation is more critical in case of displaying two pages at a time. Who to sense which on is clicked?

Please guide. sample code will help a lot to understand the concept. I tried a lot to search on these problem but didn't get anything concrete.

regards
--
sachin


Dmitriy Lapshin said:
Hi,

As far as I remember, in plain Windows API certain bits in either class
style or window style were used to indicate whether the window should have
horizontal/vertical scroll bars. These can be altered through
SetClassLong/SetWindowLong after the window has been created, but this only
controls the visibility of the scroll bars, the window should still react on
WM_HSCROLL and WM_VSCROLL to make the scroll bars "live" (as well as the
window should correctly initialize the scrollbars' min/max values).

As for the PrintPreview control, I remember it displays the scroll bar
automatically when necessary. Could you please elaborate on what exactly
behavior you want to implement? Do you want to make the scroll bar always
visible, even when there's nothing to scroll?

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

Sachin said:
To display the vertical scroll bar of any control (Print Preview Control
in perticular)which window message is set?
pls guide
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top