|
CPallini wrote: Nelek wrote:
Override these default values by passing custom sizes in the SetScrollSizes member function
I think the above is the right approach.
It depends on many things. I used this quantitative solution insteads of overriding the SetScrollSizes because my boss wanted UP/DOWN keys to scroll accuratelly and the wheel to do it faster but not changing a page that must stay as it was with PageUp/Down.
I finally used that N*SB_LINEUP/DOWN actually I used +-N*SB_LINEDOWN for the wheel to make it 3 times faster than keys or bar-arrow-clicks as he wanted.
And, as it worked fine for me (work right doesn't mean to be right, I know), I gave that option to him as well. Is there any way to do it just with "qualitative" parameter? Because I found no "fourth" messure to scroll a view. Just these 3: sizeTotal, sizePage, sizeLine...
VC++ 6.0
How can I solve that issue in a correct way?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Nelek wrote: +-N*SB_LINEDOWN
-N*SB_LINEDOWN (with N>0 ) should be meaningless to standard OnVScroll .
Even overriding OnVScroll to re-intepreter its first parameter doesn't seem to me a good design choice.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Aham,
then... how should I make to have a 3-speed scrolling as I explained but in a good structure? Line with arrow keys, middle with Wheel and Page with pageup/down keys or out the little bar at the scrollbar.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Well a quite rude, but simple solution maybe issuing three times the call to OnVScroll (PostMessage ?) with either SB_LINEDOWN or SB_LINEUP.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
Nelek wrote: I actually thought on that, but I figured that it would be worst than the other solution.
Don't change it just because I told about: before you have to find my points valid.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Once again thank you both for yours participation on this thread!
You helped me indeed.
If I realy did call pageup it suit's me. It's my fault for not checking this option before. I thought pageup/down would be big for my needs, but this is ok!
P.S.
For Nelek: pageup/down doesn't scroll a whole page (at least not in my case), I mesured when I do scroll(using mouse wheel) it takes 11 scroll lines (up/down keys)to go back at start position.
P.P.S.
my setscrollsize:
SetScrollSizes( MM_TEXT, CSize(m_nMaxX+30, m_nMaxY+90));
where m_nMaxX and m_nMaxY are from my Client rectangle!
|
|
|
|
|
With the term page I didn't mean a whole page. Read another time:
1 TotalSize = 10 Pages;
1 Page = 10 Lines;
NOTE: If you dont say anything else this is standard behaviour.
Just a question... why do u set Scroll size bigger than client area?
I.E. One DIN A-4 = 210 * 297 mm (Standard-printable-area 190 * 280 mm)
to have a ratio 5 Pixels : 1 mm in my app I used
CSize sizeTotal;
sizeTotal.cx = 950; sizeTotal.cy = 1400; //190*5 and 280*5
SetScrollSizes(MM_TEXT, sizeTotal);
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Nelek wrote: Just a question... why do u set Scroll size bigger than client area?
I use bigger scroll size because I'm placing some object's on backplane(MyView) and on my last placing I wont to enlarge my page so I can make place if user wont's to add more objects!
MyView(CFormView) is some kind of help for me because on the end I'm doing some coding (collect positions and relasionships betwen objects and then presenting it as something else....) my stuff, dont want to dother anyone with this...
Thanks everybody for their effort
|
|
|
|
|
Given a char c and an int i,
is there any difference between casting the int to the char: c = (char)i;
and just assigning it: c = i;
many thanks
Tzumer
|
|
|
|
|
Someone already answered that yesterday.
|
|
|
|
|
The result is the same.
However, (depending on the warning level set), in the latter case, i.e.
e.tzumer wrote: just assigning it: c = i;
the compiler may emit the following warning:
conversion from 'int' to 'char', possible loss of data
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
What is wrong with you?
|
|
|
|
|
shoot mike, shoot !
|
|
|
|
|
hehe, I just read the "How to get a variable name" thread.... good grief
Thank goodness wasted processor cycles don't contribute to global warming.... um ... er... they don't do they?
|
|
|
|
|
|
when i use VFW to create avi file, what does keyframe influenc on the file?
|
|
|
|
|
key Frame[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi
How to get a variable name?
I forgot the macro!
thanks
|
|
|
|
|
Hadi Dayvary wrote: How to get a variable name?
Closing your eyes and saying "Abracadabra" will sometimes work. Other than that, you'll need to rephrase your question.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hey what happend why you and other members on this thread got 1,maybe I can repair it with 5 vote.;)
|
|
|
|
|
It is something that happens a lot without sense, there should be some user of forum that hate some people here.
On the other hand... Thanks, but I don't care about the votes, I am far away less skilled as many other users so... If I really help someone my best reward is a simple "thanks" from asker.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
DavidCrow wrote: Closing your eyes and saying "Abracadabra" will sometimes work. Other than that, you'll need to rephrase your question.
I found the macro :
#define NAME(VAR) ( CString(#VAR) )
and then you can use it for getting any variable name at runtime:
CString s = NAME(m_sName);
If you don't know something it does not mean that it's not exist!
|
|
|
|
|
Don't you like the double quotes " , do you?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|