|
-
Jun 10th, 2004, 12:54 AM
#1
Thread Starter
Fanatic Member
-
Jun 14th, 2004, 04:33 AM
#2
Thread Starter
Fanatic Member
*bump*
*bump*
...it seems like editing doesn't acutally bump.
Has someone here used a Scrollbar before?
They're not that uncommon, surely...
sql_lall 
-
Jun 14th, 2004, 06:06 AM
#3
There's a difference between scrollbar controls and scrollbars. If you give a window the WS_HSCROLL and WS_VSCROLL styles it will have scrollbars. Alternatively you can add scrollbar controls to the window.
In both cases though you have to manually intercept the WM_SCROLL message and act on it. Or was that WM_VSCROLL and WM_HSCROLL? Can't remember.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jun 17th, 2004, 05:48 AM
#4
Thread Starter
Fanatic Member
and...
So....just create my own afx_msg void function, then receive the scroll message?
However:
(1) What throws the message. Is it when the user presses either scroll button? (in which case, how do you know which has been pressed)
(2) Do you have to manually move the .ScrollAt variable (or whatever it is called) or can you read this to find where you are.
(3) Are scroll bars made to cause confusion? Can't they just automatically move the scroll bit, then thow a WM_CHANGE message or something like that?
Thanks for you help
sql_lall 
-
Jun 17th, 2004, 05:58 AM
#5
1) It's the scroll, no matter how it came to be.
2) No idea what you mean.
3) They are made to be flexible. Programs can optimize their scrolling in various ways, some programs even have completely different ideas of what scrolling means.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jun 18th, 2004, 07:32 AM
#6
Thread Starter
Fanatic Member
hehe
ok...to clarify:
(1) How do you know, when you receive the message, whether it has been thrown by the pressing of the buttons at either end of the scroll-bar (moves the actual bar one unit either way), the clicking inside the scroll-bar (usually moves the actual bar more units), or clicking on the bar itself and dragging it?
Or is it just whenever it changes?
(2) In the class, there's a function (called SetScrollPos - or something similar), which allows you to set where the bar is (in relation to the start and end). I was wondering if the position updated itself when the user moved the scroll bar, or whether the programmer has to interpret the message and decide how to move the bar.
(3) It was just that, in the good-old days of simpified VB, the scroll bars were extremely programmer-friendly
sql_lall 
-
Jun 18th, 2004, 10:13 AM
#7
1) From MSDN:
Syntax
WM_HSCROLL
WPARAM wParam
LPARAM lParam;
Parameters
wParam
The low-order word specifies a scroll bar value that indicates the user's scrolling request. This word can be one of the following values.
The high-order word specifies the current position of the scroll box if the low-order word is SB_THUMBPOSITION or SB_THUMBTRACK; otherwise, this word is not used.
SB_ENDSCROLL
Ends scroll.
SB_LEFT
Scrolls to the upper left.
SB_RIGHT
Scrolls to the lower right.
SB_LINELEFT
Scrolls left by one unit.
SB_LINERIGHT
Scrolls right by one unit.
SB_PAGELEFT
Scrolls left by the width of the window.
SB_PAGERIGHT
Scrolls right by the width of the window.
SB_THUMBPOSITION
The user has dragged the scroll box (thumb) and released the mouse button. The high-order word indicates the position of the scroll box at the end of the drag operation.
SB_THUMBTRACK
The user is dragging the scroll box. This message is sent repeatedly until the user releases the mouse button. The high-order word indicates the position that the scroll box has been dragged to.
lParam
If the message is sent by a scroll bar, then this parameter is the handle to the scroll bar control. If the message is not sent by a scroll bar, this parameter is NULL.
2) I can't remember. Try.
3) I know of no "good" and "VB" in the same sentence 
VB is easy, but inflexible and inefficient.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jun 19th, 2004, 04:40 AM
#8
Thread Starter
Fanatic Member
THanks
Thankyou very much for your response...
And I agree, C++ is much better than VB....but some people can make VB look nice too...
sql_lall 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|