@@ -4203,6 +4203,7 @@ tInfoTypeMapping InfoTypes [] =
4203
4203
{ 115 , " Localization active" },
4204
4204
{ 118 , " Variables have changed" },
4205
4205
{ 119 , " Script engine active" },
4206
+ { 120 , " Scroll bar visible" },
4206
4207
4207
4208
4208
4209
// (numbers (longs) - calculated at runtime)
@@ -4302,6 +4303,7 @@ tInfoTypeMapping InfoTypes [] =
4302
4303
{ 293 , " Actual text rectangle - bottom" },
4303
4304
{ 294 , " State of keyboard modifiers" },
4304
4305
{ 295 , " Times output window redrawn" },
4306
+ { 296 , " Output window scroll bar position" },
4305
4307
4306
4308
4307
4309
// (dates - calculated at runtime)
@@ -4553,6 +4555,7 @@ VARIANT CMUSHclientDoc::GetInfo(long InfoType)
4553
4555
case 115 : SetUpVariantBool (vaResult, App.m_Translator_Lua != NULL ); break ;
4554
4556
case 118 : SetUpVariantBool (vaResult, m_bVariablesChanged); break ;
4555
4557
case 119 : SetUpVariantBool (vaResult, m_ScriptEngine != NULL ); break ;
4558
+ case 120 : SetUpVariantBool (vaResult, m_bScrollBarWanted); break ;
4556
4559
4557
4560
4558
4561
case 201 : SetUpVariantLong (vaResult, m_total_lines); break ;
@@ -5023,6 +5026,18 @@ VARIANT CMUSHclientDoc::GetInfo(long InfoType)
5023
5026
SetUpVariantLong (vaResult, m_iOutputWindowRedrawCount);
5024
5027
break ; // state of virtual keys
5025
5028
5029
+ case 296 :
5030
+ {
5031
+ CMUSHView* pmyView = GetFirstOutputWindow ();
5032
+ if (pmyView)
5033
+ {
5034
+ CPoint pt = pmyView->GetScrollPosition ();
5035
+ SetUpVariantLong (vaResult, pt.y );
5036
+ break ;
5037
+ }
5038
+ }
5039
+ break ;
5040
+
5026
5041
case 301 :
5027
5042
if (m_tConnectTime.GetTime ()) // only if non-zero, otherwise return empty
5028
5043
SetUpVariantDate (vaResult, COleDateTime (m_tConnectTime.GetTime ()));
@@ -14903,6 +14918,47 @@ long CMUSHclientDoc::WindowTransformImage(LPCTSTR Name, LPCTSTR ImageId, float L
14903
14918
14904
14919
14905
14920
14921
+ long CMUSHclientDoc::SetScroll (long Position, BOOL Visible)
14922
+ {
14923
+
14924
+ CPoint pt (0 , 0 );
14925
+ int lastline = GetLastLine ();
14926
+ m_bScrollBarWanted = Visible;
14927
+
14928
+ for (POSITION pos = GetFirstViewPosition (); pos != NULL ; )
14929
+ {
14930
+ CView* pView = GetNextView (pos);
14931
+
14932
+ if (pView->IsKindOf (RUNTIME_CLASS (CMUSHView)))
14933
+ {
14934
+ CMUSHView* pmyView = (CMUSHView*)pView;
14935
+
14936
+ int highest = (lastline * m_FontHeight) - pmyView->GetOutputWindowHeight ();
14937
+
14938
+ // -1 goes to the end
14939
+ if (Position == -1 )
14940
+ pt.y = highest;
14941
+ else
14942
+ pt.y = Position;
14943
+
14944
+ if (pt.y < 0 )
14945
+ pt.y = 0 ;
14946
+ if (pt.y > highest)
14947
+ pt.y = highest;
14948
+
14949
+ pmyView->EnableScrollBarCtrl (SB_VERT, Visible);
14950
+ if (Position != -2 ) // if -2, do not change position
14951
+ pmyView->ScrollToPosition (pt, false );
14952
+ pmyView->Invalidate ();
14953
+
14954
+ } // end of being a CMUSHView
14955
+ } // end of loop through views
14956
+
14957
+
14958
+ return eOK;
14959
+ }
14960
+
14961
+
14906
14962
/*
14907
14963
14908
14964
======================================================================
0 commit comments