<?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 Re: Pressing Return when OK button has focus in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Pressing-Return-when-OK-button-has-focus/m-p/930615#M14697</link>
    <description>Thanks, I replaced SetFocus with the call with WM_NEXTDLGCTL and it worked. &lt;BR /&gt; &lt;BR /&gt;By the way, is there a difference between PostMessage and SendMessage? &lt;BR /&gt; &lt;BR /&gt;David</description>
    <pubDate>Mon, 18 Dec 2000 19:24:11 GMT</pubDate>
    <dc:creator>davidgraham</dc:creator>
    <dc:date>2000-12-18T19:24:11Z</dc:date>
    <item>
      <title>Pressing Return when OK button has focus</title>
      <link>https://community.intel.com/t5/Software-Archive/Pressing-Return-when-OK-button-has-focus/m-p/930613#M14695</link>
      <description>I have a API project which has a dialog with several edit boxes and OK &amp;amp; Cancel buttons. &lt;BR /&gt; &lt;BR /&gt;I have programmed it so that if the user pressed Return on an edit box the focus moves to the next field. &lt;BR /&gt; &lt;BR /&gt;On the last field pressing retun passes focus to the OK button  which is displayed with a dotted line round it.  If I press Return nothing happens, but if I click on OK I get a response. &lt;BR /&gt; &lt;BR /&gt;Is there something that I am missing? &lt;BR /&gt; &lt;BR /&gt;I have tried renaming IDOK to my own ID name. &lt;BR /&gt; &lt;BR /&gt;I have noticed that the control id I get back on pressing return on the OK button is the same as on the previous edit box. &lt;BR /&gt; &lt;BR /&gt;Thanks, &lt;BR /&gt; &lt;BR /&gt;David</description>
      <pubDate>Thu, 07 Dec 2000 22:48:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Pressing-Return-when-OK-button-has-focus/m-p/930613#M14695</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2000-12-07T22:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Pressing Return when OK button has focus</title>
      <link>https://community.intel.com/t5/Software-Archive/Pressing-Return-when-OK-button-has-focus/m-p/930614#M14696</link>
      <description>You don't say how you are setting the focus to the next control. There are 'Windows issues' that cause SetFocus to misbehave; using PostMessage with the WM_NEXTDLGCTL message is safer, e.g. &lt;BR /&gt; &lt;BR /&gt;hwnd=GetDlgItem(dlg%hwnd,IDC_OK) &lt;BR /&gt;lret=PostMesage(dlg%hwnd,WM_NEXTDLGCTL,hwnd,TRUE) &lt;BR /&gt; &lt;BR /&gt;should set the focus to the OK button (with id IDC_OK used in dialog dlg) such that it will respond when the Return key is pressed. (PostMessage is defined in the module user32, TRUE is declared as = 1 in module dfwinty which I think is used in module dflogm.)</description>
      <pubDate>Mon, 18 Dec 2000 02:37:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Pressing-Return-when-OK-button-has-focus/m-p/930614#M14696</guid>
      <dc:creator>finnis_m</dc:creator>
      <dc:date>2000-12-18T02:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Pressing Return when OK button has focus</title>
      <link>https://community.intel.com/t5/Software-Archive/Pressing-Return-when-OK-button-has-focus/m-p/930615#M14697</link>
      <description>Thanks, I replaced SetFocus with the call with WM_NEXTDLGCTL and it worked. &lt;BR /&gt; &lt;BR /&gt;By the way, is there a difference between PostMessage and SendMessage? &lt;BR /&gt; &lt;BR /&gt;David</description>
      <pubDate>Mon, 18 Dec 2000 19:24:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Pressing-Return-when-OK-button-has-focus/m-p/930615#M14697</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2000-12-18T19:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Pressing Return when OK button has focus</title>
      <link>https://community.intel.com/t5/Software-Archive/Pressing-Return-when-OK-button-has-focus/m-p/930616#M14698</link>
      <description>"The SendMessage function sends the specified message to a window or windows. The function calls the window procedure for the specified window and does not return until the window procedure has processed the message. The PostMessage function, in contrast, posts a message to a thread's message queue and returns immediately."</description>
      <pubDate>Mon, 18 Dec 2000 22:12:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Pressing-Return-when-OK-button-has-focus/m-p/930616#M14698</guid>
      <dc:creator>finnis_m</dc:creator>
      <dc:date>2000-12-18T22:12:20Z</dc:date>
    </item>
  </channel>
</rss>

