473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Window Message

To display the vertical scroll bar of any control (Print Preview Control in perticular)which window message is set?
pls guide
--
sachin
Nov 16 '05 #1
2 2168
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" <sa*****@softbridge-s.com> wrote in message
news:6B**********************************@microsof t.com...
To display the vertical scroll bar of any control (Print Preview Control in perticular)which window message is set? pls guide
--
sachin


Nov 16 '05 #2
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 [C# / .NET MVP]" wrote:
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" <sa*****@softbridge-s.com> wrote in message
news:6B**********************************@microsof t.com...
To display the vertical scroll bar of any control (Print Preview Control

in perticular)which window message is set?
pls guide
--
sachin


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Pack Fan | last post by:
I've noticed that session variables will persist on Mac IE even after all browser windows have been closed. One must quit the program to clear the session variables. This presents a security risk...
3
by: J P Singh | last post by:
Hi Guys Wonder if someone can help me with this. I have a form where a user clicks a button which gives them a pop up windows to allow them to add the data. The user adds the data and click...
18
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page...
12
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank,...
19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
14
by: | last post by:
Hi All, I am little confused here, hope you can help me. While processing WM_POWERBROADCAST (wParam=PBT_APMQUERYSUSPEND), I MUST to do some lengthy operation(30 sec) before system Suspends or...
6
by: G Dean Blake | last post by:
in my aspx app I am writing a stream that works fine but it replaces what is in the client browser window. The code is as follows: .. .. HttpContext.Current.Response.ClearHeaders()...
3
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change?...
9
by: Stan B | last post by:
I create a popup window by calling window.showModalDialog Popup window has Ok button with this code attached: === string Script = "<script language=JavaScript>" + "{" + "window.close();" +...
9
by: tshad | last post by:
This was posted before but the message got messed up (all NLs were stripped out for some reason). I have 2 labels that hold the name of different images on my .aspx page. <asp:Label ID="Logo"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.