<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>тема Re: scrolling in QuickWin в Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/scrolling-in-QuickWin/m-p/935897#M15867</link>
    <description>I misread your original post, so I posted the sample with SetScrollPos -- &lt;BR /&gt;however, I don't see why GetScrollPos wouldn't work. Regarding the setting scrollbar position, you're right -- SetScrollPos only sets the thumb position -- sorry, it was long time ago since I worked with it. However, &lt;BR /&gt;you can use SendMessage with SB_THUMBPOSITION flag set to get &lt;BR /&gt;the window scrolled to the desired position: &lt;BR /&gt; &lt;BR /&gt;&lt;PRE&gt; 
iSt=SendMessage(hChild, WM_VSCROLL, SB_THUMBPOSITION + &amp;amp; 
ISHL(newPosition,16) , 0) 
&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;&amp;gt; So, apparently I am not including the correct library or module or  &lt;BR /&gt;&amp;gt; something?  &lt;BR /&gt; &lt;BR /&gt;You did (almost) everything OK -- this time, it's Compaq that's at fault. &lt;BR /&gt;It's their translation of C Win32 headers that's inconsistent, especially &lt;BR /&gt;of those that were inherited from Micro$oft FPS (there was &lt;BR /&gt;a lot of talk about it in this and the old Forum). The Win32 types are &lt;BR /&gt;always prefixed with T_ in DFWIN (and its "sub-modules"); member names &lt;BR /&gt;should be the same as described in help.  However, they made an &lt;BR /&gt;exception for reasons unknown to me with SCROLLINFO: its members &lt;BR /&gt;are declared as Min, Max, Page etc., not nMin, nMax, nPage as in help. &lt;BR /&gt;So, proper declaration is T_SCROLLINFO, and it should be looked in help &lt;BR /&gt;under SCROLLINFO. Generally, it's always a good idea when using &lt;BR /&gt;a Win32 function or type to do a "Find in Files" in Program Files/.../DF/Include to take a look on type declaration or INTERFACE block. &lt;BR /&gt; &lt;BR /&gt;Regards &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
    <pubDate>Tue, 23 Jan 2001 20:00:30 GMT</pubDate>
    <dc:creator>Jugoslav_Dujic</dc:creator>
    <dc:date>2001-01-23T20:00:30Z</dc:date>
    <item>
      <title>scrolling in QuickWin</title>
      <link>https://community.intel.com/t5/Software-Archive/scrolling-in-QuickWin/m-p/935894#M15864</link>
      <description>In the input/output window of my QuickWin application I would like to have the window automatically set the scroll bar to the bottom of the last line of text.  I know that I can use the SendMessage with WM_VSCROLL, SB_LINEDOWN parameters to scroll down one line, and I know that the GetTextPosition routine will tell me how many lines of text I have, but I need to know where the scroll bar is in order to tell it how many lines to scroll up or down.  I have not been able to get the GetScrollPos or SetScrollPos commands to work (do they only work in a complete Windows application?), or know if they would even do the trick for me if I could get them to work.</description>
      <pubDate>Sat, 20 Jan 2001 08:36:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/scrolling-in-QuickWin/m-p/935894#M15864</guid>
      <dc:creator>challener</dc:creator>
      <dc:date>2001-01-20T08:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: scrolling in QuickWin</title>
      <link>https://community.intel.com/t5/Software-Archive/scrolling-in-QuickWin/m-p/935895#M15865</link>
      <description>They should do the trick -- perhaps you just didn't implemented them &lt;BR /&gt;right way? It should look something like this: &lt;BR /&gt; &lt;BR /&gt;&lt;PRE&gt; 
USE DFWIN 
USE MSFLIB 
 
INTEGER:: hChild 
INTEGER, PARAMETER:: iChildUnit = 11 
... 
OPEN(iChildUnit, FILE='USER',...) 
... 
hChild=GetHWNDQQ(iChildUnit) 
iSt=SetScrollPos(hChild, SB_VERT, newPosition, .TRUE.) 
&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;Btw, did they fix the QW scrollbars so that the thumb is &lt;BR /&gt;proportional to visible portion of the data? If not, take &lt;BR /&gt;a look into SetScrollInfo(hChild, SB_VERT, SI, .TRUE.), &lt;BR /&gt;where SI is of type T_SCROLLINFO, which contains nMin, &lt;BR /&gt;nMax and nPage members. &lt;BR /&gt; &lt;BR /&gt;HTH  &lt;BR /&gt;Jugoslav</description>
      <pubDate>Sat, 20 Jan 2001 23:06:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/scrolling-in-QuickWin/m-p/935895#M15865</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-01-20T23:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: scrolling in QuickWin</title>
      <link>https://community.intel.com/t5/Software-Archive/scrolling-in-QuickWin/m-p/935896#M15866</link>
      <description>Thanks for the reply!  I am probably being dense, but I still have problems.  The SetScrollPos command does indeed move the position of the thumb in the scroll bar, but it doesn't actually scroll the text in the window.  If I could get the GetScrollInfo command to work, then I could at least figure out how many lines up or down I need to go to reach the end of the text and then use the SB_LINEUP or SB_LINEDOWN to go there, although that seems a very indirect way to do what I want to do.  When I include the statement: &lt;BR /&gt; &lt;BR /&gt;TYPE (T_SCROLLINFO) si &lt;BR /&gt; &lt;BR /&gt;the program compiles okay, but it doesn't recognize the variables si.nMin, si.nMax, or si.nPage.  Instead I get the error, "This is not a field name that is defined in the encompassing structure" for each of them. &lt;BR /&gt; &lt;BR /&gt;When I enter the Help Index, I cannot find any information about "T_SCROLLINFO."  Instead, I find the "SCROLLINFO" structure defined with the nMin, nMax, nPage, etc. elements.  However, when I include the statement, &lt;BR /&gt; &lt;BR /&gt;TYPE (SCROLLINFO) si &lt;BR /&gt; &lt;BR /&gt;in the program, I get the error message "This derived type name has not been declared."  So, apparently I am not including the correct library or module or something? &lt;BR /&gt; &lt;BR /&gt;Bill</description>
      <pubDate>Tue, 23 Jan 2001 05:04:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/scrolling-in-QuickWin/m-p/935896#M15866</guid>
      <dc:creator>challener</dc:creator>
      <dc:date>2001-01-23T05:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: scrolling in QuickWin</title>
      <link>https://community.intel.com/t5/Software-Archive/scrolling-in-QuickWin/m-p/935897#M15867</link>
      <description>I misread your original post, so I posted the sample with SetScrollPos -- &lt;BR /&gt;however, I don't see why GetScrollPos wouldn't work. Regarding the setting scrollbar position, you're right -- SetScrollPos only sets the thumb position -- sorry, it was long time ago since I worked with it. However, &lt;BR /&gt;you can use SendMessage with SB_THUMBPOSITION flag set to get &lt;BR /&gt;the window scrolled to the desired position: &lt;BR /&gt; &lt;BR /&gt;&lt;PRE&gt; 
iSt=SendMessage(hChild, WM_VSCROLL, SB_THUMBPOSITION + &amp;amp; 
ISHL(newPosition,16) , 0) 
&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;&amp;gt; So, apparently I am not including the correct library or module or  &lt;BR /&gt;&amp;gt; something?  &lt;BR /&gt; &lt;BR /&gt;You did (almost) everything OK -- this time, it's Compaq that's at fault. &lt;BR /&gt;It's their translation of C Win32 headers that's inconsistent, especially &lt;BR /&gt;of those that were inherited from Micro$oft FPS (there was &lt;BR /&gt;a lot of talk about it in this and the old Forum). The Win32 types are &lt;BR /&gt;always prefixed with T_ in DFWIN (and its "sub-modules"); member names &lt;BR /&gt;should be the same as described in help.  However, they made an &lt;BR /&gt;exception for reasons unknown to me with SCROLLINFO: its members &lt;BR /&gt;are declared as Min, Max, Page etc., not nMin, nMax, nPage as in help. &lt;BR /&gt;So, proper declaration is T_SCROLLINFO, and it should be looked in help &lt;BR /&gt;under SCROLLINFO. Generally, it's always a good idea when using &lt;BR /&gt;a Win32 function or type to do a "Find in Files" in Program Files/.../DF/Include to take a look on type declaration or INTERFACE block. &lt;BR /&gt; &lt;BR /&gt;Regards &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Tue, 23 Jan 2001 20:00:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/scrolling-in-QuickWin/m-p/935897#M15867</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-01-23T20:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: scrolling in QuickWin</title>
      <link>https://community.intel.com/t5/Software-Archive/scrolling-in-QuickWin/m-p/935898#M15868</link>
      <description>Thank you very much!  It now works the way I had hoped.  My final subroutine, if of any interest, is:  &lt;BR /&gt;&lt;FONT size="+1"&gt;&lt;BR /&gt;&lt;PRE&gt;
	Subroutine ResetScrollPosition  
    USE dflib  
	USE dfwin  
	IMPLICIT	NONE  
	TYPE		(RCCOORD)		textpos  
	TYPE		(T_SCROLLINFO)	si  
	INTEGER(2)	NumRows  
	INTEGER		status,win_handle,newPos  
	COMMON		/Handles/	win_handle,NumRows  
  
	Call GetTextPosition(textpos)  
	If (textpos.row.GT.20) then  
	  si.Size = sizeof(si)  
	  si.Mask = SIF_ALL  
	  status = GetScrollInfo(win_handle,SB_VERT,si)  
	  newPos = ISHL(NINT(si.Max*(textpos.row-20.0)/NumRows),16) + SB_THUMBPOSITION  
	  status = SendMessage(win_handle,WM_VSCROLL,newPos,0)  
	End if  
	Return  
	End  
&lt;/PRE&gt;&lt;/FONT&gt;&lt;BR /&gt;NumRows is obviously the integer setting the number of rows in the window when originally created.</description>
      <pubDate>Wed, 24 Jan 2001 07:47:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/scrolling-in-QuickWin/m-p/935898#M15868</guid>
      <dc:creator>challener</dc:creator>
      <dc:date>2001-01-24T07:47:14Z</dc:date>
    </item>
  </channel>
</rss>

