<?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: how to stop it from closing in Modai Dialog (Enter key or ESC key ) in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/644571#M10054</link>
    <description>&lt;P&gt;There is&amp;nbsp;DG_MSG_CLOSEREQUEST message.&lt;BR /&gt;But unfortunately, it is not documetnted.&amp;nbsp;I use C++ dialogs, and i dont know any details, sorry.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Dec 2024 04:56:59 GMT</pubDate>
    <dc:creator>Oleg</dc:creator>
    <dc:date>2024-12-25T04:56:59Z</dc:date>
    <item>
      <title>how to stop it from closing in Modai Dialog (Enter key or ESC key )</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/643452#M10031</link>
      <description>&lt;P&gt;I am programming a c++ add-on using ArchiCAD27API + Visual Studio 2019 + Windows 10.&lt;/P&gt;&lt;P&gt;When I press the Enter key or ESC key in the Modai Dialog, the dialog closes.&lt;/P&gt;&lt;P&gt;Please tell me how to stop it from closing&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 00:52:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/643452#M10031</guid>
      <dc:creator>nishida_jp</dc:creator>
      <dc:date>2024-12-13T00:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to stop it from closing in Modai Dialog (Enter key or ESC key )</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/643696#M10036</link>
      <description>&lt;P&gt;Use the PanelCloseRequested of the PanelObserver.&lt;BR /&gt;&lt;BR /&gt;See the&amp;nbsp;AddRenameViewPointItemDialog.cpp of Navigator_Test&amp;nbsp;example.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 12:58:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/643696#M10036</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2024-12-16T12:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to stop it from closing in Modai Dialog (Enter key or ESC key )</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/644558#M10053</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;BR /&gt;My program uses DGModalDialog() and I can't perform the processing you suggested.&lt;BR /&gt;If you know of any other ways, please let me know.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2024 23:49:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/644558#M10053</guid>
      <dc:creator>nishida_jp</dc:creator>
      <dc:date>2024-12-24T23:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to stop it from closing in Modai Dialog (Enter key or ESC key )</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/644571#M10054</link>
      <description>&lt;P&gt;There is&amp;nbsp;DG_MSG_CLOSEREQUEST message.&lt;BR /&gt;But unfortunately, it is not documetnted.&amp;nbsp;I use C++ dialogs, and i dont know any details, sorry.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2024 04:56:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/644571#M10054</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2024-12-25T04:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to stop it from closing in Modai Dialog (Enter key or ESC key )</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/645481#M10076</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I try DG_MSG_CLOSEREQUEST.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 23:11:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/645481#M10076</guid>
      <dc:creator>nishida_jp</dc:creator>
      <dc:date>2025-01-08T23:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to stop it from closing in Modai Dialog (Enter key or ESC key )</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/647794#M10099</link>
      <description>&lt;P&gt;You use a C-style dialog if I am correct.&lt;BR /&gt;In C-style dialogs the DG_MSG_CLOSEREQUEST is not used.&lt;/P&gt;
&lt;P&gt;When you click the Ok or Cancel button or pess Esc/Enter, a DG_MSG_CLICK message is sent. If you return a 0 value in response of this message then the dialog will not be closed.&lt;BR /&gt;In general the dialog handler returns the button identifier for Ok/Cancel which enables the dialog to close, but you can return 0 to prevent closing the dialog:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;case DG_MSG_CLICK:
	switch (itemId) {
		case DG_OK:
		case DG_CANCEL:
			if (doNotCloseDialog) {
				return 0;
			}
			return itemId;
		case AnyOtherButton:
			...
			return 0;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An other approach could be to use the DGRegisterHotKey function to steal the Esc/Enter keyboard events and not allow them to be processed by the dialog. In this case the dialog will accept the click events on the Ok/Cancel button but refuse to respond to the Enter/Esc keys.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 11:48:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/how-to-stop-it-from-closing-in-Modai-Dialog-Enter-key-or-ESC-key/m-p/647794#M10099</guid>
      <dc:creator>Miklos Vegh</dc:creator>
      <dc:date>2025-01-29T11:48:07Z</dc:date>
    </item>
  </channel>
</rss>

