<?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: Simulating a button click? in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Simulating-a-button-click/m-p/794808#M34587</link>
    <description>The BM_CLICK message has exactly that purpose.&lt;BR /&gt;&lt;BR /&gt;Send it to the control with sendmessage(hctrl,BM_CLICK,0,0)&lt;BR /&gt;&lt;BR /&gt;See :&lt;BR /&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/buttons/buttonreference/buttonmessages/bm_click.asp" target="_blank"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/buttons/buttonreference/buttonmessages/bm_click.asp&lt;/A&gt;</description>
    <pubDate>Mon, 23 Aug 2004 21:02:54 GMT</pubDate>
    <dc:creator>aliho</dc:creator>
    <dc:date>2004-08-23T21:02:54Z</dc:date>
    <item>
      <title>Simulating a button click?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Simulating-a-button-click/m-p/794806#M34585</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Hi,&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;In a certain situation I would like to be able to simulate the click of a button without actually having to click it. For example, when a user clicks a particular radio button, I would like the program to behave as though the user had then immediately clicked the OK button as well. Can this be done?&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;With many thanks in advance,&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Mike&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Aug 2004 10:30:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Simulating-a-button-click/m-p/794806#M34585</guid>
      <dc:creator>michael_green</dc:creator>
      <dc:date>2004-08-23T10:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating a button click?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Simulating-a-button-click/m-p/794807#M34586</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;&lt;PRE&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE&gt;Here is how I send such a message to a button control, ID=IDC_DISPLAY_FILE. gDlg is type T_DIALOG&lt;/PRE&gt;&lt;PRE&gt;and gDlg%hWnd is the handle to the dialog containing the control. IOR combines the BN_CLICKED &lt;/PRE&gt;&lt;PRE&gt;and the control ID into high and low order parts of the first argument of the WM_COMMAND. &lt;/PRE&gt;&lt;PRE&gt;GetDlgItem supplies the handle to the control with ID IDC_DISPLAY_FILE as&lt;/PRE&gt;&lt;PRE&gt;the second argument required by WM_COMMAND (See below)&lt;/PRE&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE&gt; 	retlog = SendMessage(gdlg%hWnd,WM_COMMAND, IOR(BN_CLICKED,IDC_DISPLAY_FILE),    &amp;amp;
	                                          GetDlgItem(gdlg%hWnd,IDC_DISPLAY_FILE))&lt;/PRE&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE&gt;WM_COMMAND takes two arguments (see CVF HELP) as shown below&lt;DIV style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: black 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; BORDER-LEFT: black 1px solid; PADDING-TOP: 10px; BORDER-BOTTOM: black 1px solid"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;PRE&gt;WM_COMMAND 
wNotifyCode = HIWORD(wParam); // notification code 
wID = LOWORD(wParam);         // item, control, or accelerator identifier 
hwndCtl = (HWND) lParam;      // handle of control 
 
Parameters
wNotifyCode 
Value of the high-order word of wParam. Specifies the notification code if the message is from a control. If the message is from an accelerator, this parameter is 1. If the message is from a menu, this parameter is 0. 
wID 
Value of the low-order word of wParam. Specifies the identifier of the menu item, control, or accelerator. 
hwndCtl 
Value of lParam. Handle to the control sending the message if the message is from a control. Otherwise, this parameter is NULL. 
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;/PRE&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Message Edited by anthonyrichards on &lt;SPAN class="date_text"&gt;08-23-2004&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:41 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;Message Edited by anthonyrichards on &lt;SPAN class="date_text"&gt;08-23-2004&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:47 AM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2004 16:31:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Simulating-a-button-click/m-p/794807#M34586</guid>
      <dc:creator>anthonyrichards</dc:creator>
      <dc:date>2004-08-23T16:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating a button click?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Simulating-a-button-click/m-p/794808#M34587</link>
      <description>The BM_CLICK message has exactly that purpose.&lt;BR /&gt;&lt;BR /&gt;Send it to the control with sendmessage(hctrl,BM_CLICK,0,0)&lt;BR /&gt;&lt;BR /&gt;See :&lt;BR /&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/buttons/buttonreference/buttonmessages/bm_click.asp" target="_blank"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/buttons/buttonreference/buttonmessages/bm_click.asp&lt;/A&gt;</description>
      <pubDate>Mon, 23 Aug 2004 21:02:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Simulating-a-button-click/m-p/794808#M34587</guid>
      <dc:creator>aliho</dc:creator>
      <dc:date>2004-08-23T21:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating a button click?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Simulating-a-button-click/m-p/794809#M34588</link>
      <description>&lt;DIV&gt;Another method is possible, if you have assigned a callback routine, MyButtonSub say,&lt;/DIV&gt;
&lt;DIV&gt;to the button, by just calling the callback directly as&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;call MyButtonSub( ButtonDlg, IDC_MYBUTTON, dlg_clicked)&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;where ButtonDlg is type T_Dialog and is the dialog containing the button whose ID is defined to be IDC_MYBUTTON. The ID is normally listed in RESOURCE.FD that is generated by the Resource compiler when it builds your dialog, so INCLUDE RESOURCE.FD must be added to&lt;/DIV&gt;
&lt;DIV&gt;the routine from which you call the callback routine, and the dialog ButtonDlg must be available&lt;/DIV&gt;
&lt;DIV&gt;(possibly via a global variable) to the same routine. 'Dlg_Clicked' is defined in DFLOGM.F90 in Module DFLOGM ( integer, parameter, public :: dlg_clicked = -4), so USE DFLOGM must also be added to the code for the calling routine. HTH&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Aug 2004 19:08:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Simulating-a-button-click/m-p/794809#M34588</guid>
      <dc:creator>anthonyrichards</dc:creator>
      <dc:date>2004-08-27T19:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating a button click?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Simulating-a-button-click/m-p/794810#M34589</link>
      <description>&lt;DIV&gt;Hi Anthony,&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;The first method you suggested works very well and I am using it to great effect. However, I will note your second suggestion for the future.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;With many thanks&lt;/DIV&gt;
&lt;DIV&gt;Mike&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Aug 2004 07:21:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Simulating-a-button-click/m-p/794810#M34589</guid>
      <dc:creator>michael_green</dc:creator>
      <dc:date>2004-08-30T07:21:46Z</dc:date>
    </item>
  </channel>
</rss>

