<?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>topic I'm confused. There's no in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052195#M115397</link>
    <description>&lt;P&gt;I'm confused. There's no IFLOGM code in this subroutine - all the calls are to Windows API routines.&lt;/P&gt;

&lt;P&gt;Or perhaps you've (invisibly to what you posted) extracted the handle to the IFLOGM control and are using these APIs to modify it. I see that MSDN suggests using SetScrollInfo instead of SetScrollPos - did you try that? But I am not sure this is supposed to work at all - the IFLOGM code believes it knows where the position is and it will reset it the next time it sends a message to the control.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Mar 2015 18:50:00 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2015-03-16T18:50:00Z</dc:date>
    <item>
      <title>IFLOGM dialog scroll bar position problem</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052194#M115396</link>
      <description>&lt;P&gt;I was making an update to my last remaining program that uses IFLOGM for dialogs rather than the Windows SDK. Consider the small routine below which gets the handle for a list box on a modeless dialog, gets the min / max range of the vertical scroll bar and then sets the current position to the max position such that you can see the info that has been put there.&lt;/P&gt;

&lt;P&gt;This works fine in that the 'get' returns the correct values, and 'set' returns with the correct position before the update, however irrespective of where the slider thumb was or has been set to the dialog is always then displayed with the thumb moved to position zero. IE my set has no effect.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Is my code wrong? Is it just a 'feature' of the IFLOGM implementation of dialogs? Is there a simple alternative method?&lt;/P&gt;

&lt;P&gt;Any ideas would be appreciated.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Best Regards, Andrew&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;subroutine update_scroll_pos()
    use             :: ifwin, only: bool, LPINT, GetScrollRange, TRUE, SetScrollPos, &amp;amp;
                                    SB_VERT, SINT, GetDlgItem, handle, SB_CTL
    use             :: dku, only: gdlg, IDC_LIST_MESG
    use, intrinsic  :: iso_c_binding, only: c_loc
    implicit none
    integer(handle) :: Hwnd
    integer(bool)   :: bret
    integer         :: ipmin, ipmax 
    integer(SINT)   :: ipos
    hwnd = GetDlgItem(gdlg%hwnd,IDC_LIST_MESG)
    bret = GetScrollRange( Hwnd, SB_VERT, &amp;amp;
                           transfer(C_loc(ipmin),hwnd),&amp;amp;
                           transfer(C_loc(ipmax),hwnd)     )
    if(bret /= 0) ipos = SetScrollPos( Hwnd, SB_VERT, int(ipmax, sint) , TRUE )
end subroutine update_scroll_pos &lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2015 10:14:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052194#M115396</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2015-03-15T10:14:04Z</dc:date>
    </item>
    <item>
      <title>I'm confused. There's no</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052195#M115397</link>
      <description>&lt;P&gt;I'm confused. There's no IFLOGM code in this subroutine - all the calls are to Windows API routines.&lt;/P&gt;

&lt;P&gt;Or perhaps you've (invisibly to what you posted) extracted the handle to the IFLOGM control and are using these APIs to modify it. I see that MSDN suggests using SetScrollInfo instead of SetScrollPos - did you try that? But I am not sure this is supposed to work at all - the IFLOGM code believes it knows where the position is and it will reset it the next time it sends a message to the control.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2015 18:50:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052195#M115397</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-03-16T18:50:00Z</dc:date>
    </item>
    <item>
      <title>The dialog is created by</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052196#M115398</link>
      <description>&lt;P&gt;The dialog is created by IFLOGM (dlgmodeless),&amp;nbsp;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13.0080003738403px; line-height: 14.3088006973267px;"&gt;gdlg is of type dialog. I haven't rechecked but there never used to be any options for moving scroll bar positions hence the use of the sdk.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13.0080003738403px; line-height: 14.3088006973267px;"&gt;It doesn't respond to the positioning routine above and if the slider it is manually positioned and another line is added the unsorted list box the slider always gets reset to the top position. Quite annoying as the thing added cannot then be seen.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2015 19:00:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052196#M115398</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2015-03-16T19:00:08Z</dc:date>
    </item>
    <item>
      <title>Right - IFLOGM will reset the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052197#M115399</link>
      <description>&lt;P&gt;Right - IFLOGM will reset the position to what it thinks it is. &amp;nbsp;From what I can see in the code (and you can follow along in IFLOGM.f90), the control will be reset the next time IFLOGM sends it a message.&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;   case (ctrl_scrollbar)
    scrollInfo % Size = SIZEOF(scrollInfo)
    scrollInfo % Mask = SIF_ALL
    scrollInfo % Min = dlg % list(index) % intvalue(5)
    scrollInfo % Max = dlg % list(index) % intvalue(2)
    scrollInfo % Pos = dlg % list(index) % intvalue(1)
    scrollInfo % Page = dlg % list(index) % intvalue(4)
    dummyi = DlgSendMessage( hwndControl, SBM_SETSCROLLINFO, &amp;amp;
       1, loc(scrollInfo))
    ! Note: EnableScrollBar is called after SBM_SETSCROLLINFO
    !       Otherwise disabling does not work.
      if (dlg % list(index) % logvalue(1)) then
      dummyL = EnableScrollBar( hwndControl, SB_CTL, ESB_ENABLE_BOTH)
    else
      dummyL = EnableScrollBar( hwndControl, SB_CTL, ESB_DISABLE_BOTH)
    end if&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2015 19:01:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052197#M115399</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-03-16T19:01:00Z</dc:date>
    </item>
    <item>
      <title>Quote:Steve Lionel (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052198#M115400</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Intel) wrote:&lt;BR /&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;I&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;see that MSDN suggests using SetScrollInfo instead of SetScrollPos - did you try that?&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Funny you should say that because a few minutes ago I looked at some old code and it would seem I adjusted a slider position on a quickwin child window using get/&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.0080003738403px; line-height: 17.7381820678711px;"&gt;SetScrollInfo it would seem. I was just about to give it a whirl....&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2015 19:08:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052198#M115400</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2015-03-16T19:08:49Z</dc:date>
    </item>
    <item>
      <title>I don't think it will help -</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052199#M115401</link>
      <description>&lt;P&gt;I don't think it will help - if you look at the code I posted, which is used when IFLOGM wants to update its controls, it sets the position to a value from the dialog structure (one that is private so you don't have access to it.)&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2015 19:45:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052199#M115401</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-03-16T19:45:50Z</dc:date>
    </item>
    <item>
      <title>Or... try calling DlgSetInt</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052200#M115402</link>
      <description>&lt;P&gt;Or... try calling DLGSET with an index of dlg_position and the position you want for the value.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2015 19:48:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052200#M115402</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2015-03-16T19:48:00Z</dc:date>
    </item>
    <item>
      <title>It would appear that when you</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052201#M115403</link>
      <description>&lt;P&gt;It would appear that when you add and item to the list the scroll position gets set to Min irrespective of what you do as a user so I will ignore this problem for now.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;As it is a one dialog application doing via the sdk will not take long when I update this code next....&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2015 19:49:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052201#M115403</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2015-03-16T19:49:31Z</dc:date>
    </item>
    <item>
      <title>DLGSET / dlg_position works</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052202#M115404</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 16.3636360168457px;"&gt;DLGSET / dlg_position works with slider controls but not with the side bar on a list box control.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2015 20:16:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052202#M115404</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2015-03-16T20:16:53Z</dc:date>
    </item>
    <item>
      <title>There is a list box message</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052203#M115405</link>
      <description>&lt;P&gt;There is a list box message LB_SETCURSEL which, when issued with the item number should bring the selected item into view, thus automatically setting the vertical scroll bar.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2015 14:02:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052203#M115405</guid>
      <dc:creator>Anthony_Richards</dc:creator>
      <dc:date>2015-03-18T14:02:18Z</dc:date>
    </item>
    <item>
      <title>Quote:Anthony Richards wrote:</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052204#M115406</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Anthony Richards wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;There is a list box message LB_SETCURSEL which, when issued with the item number should bring the selected item into view, thus automatically setting the vertical scroll bar.&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Yes sending messages would work on an SDK dialog but a IFLOGM dialogs have some intel message processing layer and changing the position programmatically or by user input does not help as it keeps getting reset to the top when other events happen. I have given up with this and will just convert it to run via the SDK when I next work on it.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2015 19:33:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052204#M115406</guid>
      <dc:creator>andrew_4619</dc:creator>
      <dc:date>2015-03-18T19:33:22Z</dc:date>
    </item>
    <item>
      <title>Have you tried sub-classing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052205#M115407</link>
      <description>&lt;P&gt;Have you tried sub-classing the dialog just to handle list box messages?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2015 10:21:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/IFLOGM-dialog-scroll-bar-position-problem/m-p/1052205#M115407</guid>
      <dc:creator>Anthony_Richards</dc:creator>
      <dc:date>2015-03-19T10:21:40Z</dc:date>
    </item>
  </channel>
</rss>

