<?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 Setting Focus on Scrolling Window in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Setting-Focus-on-Scrolling-Window/m-p/836713#M55511</link>
    <description>&lt;DIV&gt;After a lot of agony, I have now managed to get my scrolling window to work. However, I have come up against a problem regarding using the page-up and page-down buttons. Jugoslav Dujic sent me a program which filled a scrolling window and allowed the vertical scroll bar to scroll the window contents up and down. This is now working in my own program.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;However, in his WM_VSCROLL clause, he has the following code:&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt; case(SB_PAGEUP)&lt;BR /&gt; newPos = iPos - MAX_LINES !Subtract one page&lt;BR /&gt; case(SB_PAGEDOWN)&lt;BR /&gt; newPos = iPos + MAX_LINES !Add one page&lt;BR /&gt;to allow the user to page up and down with the up/down buttons. Unfortunately it does not work because it does not allow a focus onto the screen itself. This is the CreateWindowEx code:&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt; ghwndMain = CreateWindowEx( 0, lpszClassName, &amp;amp;&lt;BR /&gt; lpszAppName, &amp;amp;&lt;BR /&gt; WS_OVERLAPPEDWINDOW.OR.WS_VSCROLL, &amp;amp;&lt;BR /&gt; CW_USEDEFAULT, &amp;amp;&lt;BR /&gt; 0, &amp;amp;&lt;BR /&gt; CW_USEDEFAULT, &amp;amp;&lt;BR /&gt; 0, &amp;amp;&lt;BR /&gt; NULL, &amp;amp;&lt;BR /&gt; ghMenu, &amp;amp;&lt;BR /&gt; hInstance, &amp;amp;&lt;BR /&gt; NULL &amp;amp;&lt;BR /&gt; )&lt;BR /&gt;I would imagine that one of these parameters must be set to allow the screen not to be unavailable to the user, but working through the help for the command, I cannot determine which one it is.&lt;/DIV&gt;
&lt;DIV&gt;Please could you indicate how to make the scrolling screen able to be focused upon so that I can do the page up/down.&lt;/DIV&gt;
&lt;DIV&gt;My next task is going to be to allow the user to type an answer into the window on the presentation of a suitable question. I will also need to allow focus to do this.&lt;/DIV&gt;</description>
    <pubDate>Sat, 18 Jun 2005 01:34:31 GMT</pubDate>
    <dc:creator>rtsmith</dc:creator>
    <dc:date>2005-06-18T01:34:31Z</dc:date>
    <item>
      <title>Setting Focus on Scrolling Window</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Setting-Focus-on-Scrolling-Window/m-p/836713#M55511</link>
      <description>&lt;DIV&gt;After a lot of agony, I have now managed to get my scrolling window to work. However, I have come up against a problem regarding using the page-up and page-down buttons. Jugoslav Dujic sent me a program which filled a scrolling window and allowed the vertical scroll bar to scroll the window contents up and down. This is now working in my own program.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;However, in his WM_VSCROLL clause, he has the following code:&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt; case(SB_PAGEUP)&lt;BR /&gt; newPos = iPos - MAX_LINES !Subtract one page&lt;BR /&gt; case(SB_PAGEDOWN)&lt;BR /&gt; newPos = iPos + MAX_LINES !Add one page&lt;BR /&gt;to allow the user to page up and down with the up/down buttons. Unfortunately it does not work because it does not allow a focus onto the screen itself. This is the CreateWindowEx code:&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt; ghwndMain = CreateWindowEx( 0, lpszClassName, &amp;amp;&lt;BR /&gt; lpszAppName, &amp;amp;&lt;BR /&gt; WS_OVERLAPPEDWINDOW.OR.WS_VSCROLL, &amp;amp;&lt;BR /&gt; CW_USEDEFAULT, &amp;amp;&lt;BR /&gt; 0, &amp;amp;&lt;BR /&gt; CW_USEDEFAULT, &amp;amp;&lt;BR /&gt; 0, &amp;amp;&lt;BR /&gt; NULL, &amp;amp;&lt;BR /&gt; ghMenu, &amp;amp;&lt;BR /&gt; hInstance, &amp;amp;&lt;BR /&gt; NULL &amp;amp;&lt;BR /&gt; )&lt;BR /&gt;I would imagine that one of these parameters must be set to allow the screen not to be unavailable to the user, but working through the help for the command, I cannot determine which one it is.&lt;/DIV&gt;
&lt;DIV&gt;Please could you indicate how to make the scrolling screen able to be focused upon so that I can do the page up/down.&lt;/DIV&gt;
&lt;DIV&gt;My next task is going to be to allow the user to type an answer into the window on the presentation of a suitable question. I will also need to allow focus to do this.&lt;/DIV&gt;</description>
      <pubDate>Sat, 18 Jun 2005 01:34:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Setting-Focus-on-Scrolling-Window/m-p/836713#M55511</guid>
      <dc:creator>rtsmith</dc:creator>
      <dc:date>2005-06-18T01:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Focus on Scrolling Window</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Setting-Focus-on-Scrolling-Window/m-p/836714#M55512</link>
      <description>Hi Richard,&lt;BR /&gt;&lt;BR /&gt;I hope you overcame your recent painting problems -- did you?&lt;BR /&gt;&lt;BR /&gt;There's nothing suspicious about that CreateWindow call itself -- the problem has to lie elsewhere. &lt;BR /&gt;&lt;BR /&gt;One simple case is that your window ended up disabled somehow; however, that would require that you have called EnableWindow(FALSE)   yourself. So, you can test the enabled state of the window using IsWindowEnabled routine, but I guess it will return TRUE.&lt;BR /&gt;&lt;BR /&gt;Other than that, there could be a lot of reasons why you cannot access the window. Note that, if the window's caption is blue, that means it is enabled. &lt;BR /&gt;&lt;BR /&gt;However, default Windows scrollbars act a bit strangely -- that's probably a remnant from Windows 3.x days. Namely, they don't "stick" when user moves them -- instead, the application has to process WM_*SCROLL message and adjust their position itself, in a manner similar to what I have shown. Did you include SB_LINEUP/LINEDOWN cases in your code -- these handle the click on scrollbar's arrow? SB_PAGEUP/SB_PAGEDOWN handle the click on scrollbar's empty area.&lt;BR /&gt;&lt;BR /&gt;Jugoslav</description>
      <pubDate>Mon, 20 Jun 2005 22:33:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Setting-Focus-on-Scrolling-Window/m-p/836714#M55512</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2005-06-20T22:33:47Z</dc:date>
    </item>
  </channel>
</rss>

