{"id":16635,"date":"2024-07-10T00:09:34","date_gmt":"2024-07-09T16:09:34","guid":{"rendered":"https:\/\/blog.iyatt.com\/?p=16635"},"modified":"2024-08-08T20:00:49","modified_gmt":"2024-08-08T12:00:49","slug":"objectarx-2025-%e9%a1%b9%e7%9b%ae%e6%96%87%e4%bb%b6%e7%bb%93%e6%9e%84%ef%bc%88%e7%bc%96%e8%be%91%e4%b8%ad%ef%bc%89","status":"publish","type":"post","link":"https:\/\/blog.iyatt.com\/?p=16635","title":{"rendered":"ObjectARX 2025\uff08C++\uff09\u5165\u95e8 hello world"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title ez-toc-toggle\" style=\"cursor:pointer\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blog.iyatt.com\/?p=16635\/#%E7%8E%AF%E5%A2%83\" >\u73af\u5883<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blog.iyatt.com\/?p=16635\/#hello_world\" >hello world<\/a><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"%E7%8E%AF%E5%A2%83\"><\/span>\u73af\u5883<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>AutoCAD \u673a\u68b0\u7248 2025<br \/>\nObjectARX 2025<br \/>\nVisual Studio 2022<\/p>\n<p>ObjectARX \u5f00\u53d1\u73af\u5883\u914d\u7f6e\u53c2\u8003\uff1a<a href=\"https:\/\/blog.iyatt.com\/?p=16480\">https:\/\/blog.iyatt.com\/?p=16480<\/a><\/p>\n<h1><span class=\"ez-toc-section\" id=\"hello_world\"><\/span>hello world<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>\u901a\u8fc7\u5411\u5bfc\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\uff08\u53c2\u8003\u73af\u5883\u914d\u7f6e\u7bc7\uff09\uff0c\u76ee\u5f55\u7ed3\u6784\u5982\u4e0b<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2024\/07\/image-1722948260650.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 329px; --smush-placeholder-aspect-ratio: 329\/346;\" \/><\/p>\n<p>\u6dfb\u52a0\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7c7b\uff0c\u5206\u522b\u65b0\u5efa\u5934\u6587\u4ef6 <strong>Hello.hpp<\/strong> \u548c <strong>Hello.cpp<\/strong><br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2024\/07\/image-1722952303093.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 342px; --smush-placeholder-aspect-ratio: 342\/405;\" \/><\/p>\n<p>Hello.hpp<\/p>\n<pre><code class=\"language-cpp\">#pragma once\n\nclass Hello\n{\npublic:\n    \/**\n     * @brief \u521d\u59cb\u5316\u547d\u4ee4\n     *\/\n    static void helloInit();\n\n    \/**\n     * @brief \u5378\u8f7d\n     *\/\n    static void helloUnload();\n\nprivate:\n    \/**\n     * @brief hello \u547d\u4ee4\u7684\u5b9e\u73b0\n     *\/\n    static void helloWorld();\n};<\/code><\/pre>\n<p>Hello.cpp<\/p>\n<pre><code class=\"language-cpp\">#include &quot;StdAfx.h&quot; \/\/ \u8fd9\u4e2a\u5934\u6587\u4ef6\u5df2\u7ecf\u5305\u542b\u4e86 ObjectARX \u7684\u5404\u79cd\u5934\u6587\u4ef6\uff0c\u53ea\u9700\u8981\u5f15\u7528\u5b83\u5c31\u884c\uff0c\u4e14\u9700\u8981\u5c06\u5b83\u653e\u5728\u7b2c\u4e00\u4e2a\u5f15\u7528\n#include &quot;Hello.hpp&quot;\n\nvoid Hello::helloInit()\n{\n    \/\/ \u6ce8\u518c\u547d\u4ee4\n    acedRegCmds-&gt;addCommand(\n        L&quot;helloGroup&quot;, \/\/ \u547d\u4ee4\u7ec4\u540d\n        L&quot;hello&quot;, \/\/ \u547d\u4ee4\u5168\u5c40\u540d\u79f0\n        L&quot;hello&quot;, \/\/ \u547d\u4ee4\u672c\u5730\u540d\u79f0\uff08\u901a\u8fc7\u8fd9\u91cc\u6307\u5b9a\u7684\u547d\u4ee4\u8c03\u7528\uff09\n        ACRX_CMD_MODAL, \/\/ \u5176\u5b83\u547d\u4ee4\u6267\u884c\u671f\u95f4\uff0c\u672c\u547d\u4ee4\u4e0d\u53ef\u6267\u884c\n        Hello::helloWorld \/\/ \u8c03\u7528\u7684\u76ee\u6807\n    );\n}\n\nvoid Hello::helloUnload()\n{\n    acedRegCmds-&gt;removeGroup(L&quot;helloGroup&quot;); \/\/ \u5378\u8f7d\u547d\u4ee4\u7ec4\n}\n\nvoid CALLBACK TimerProc(HWND wnd, UINT msg, UINT_PTR event, DWORD time)\n{\n    static int count = 10;\n    if (count &gt;= 0)\n    {\n        acutPrintf(L&quot;%d\\n&quot;, count);\n    }\n    else\n    {\n        KillTimer(nullptr, event);\n        acutPrintf(L&quot;\u5012\u8ba1\u65f6\u7ed3\u675f\\n&quot;);\n    }\n    --count;\n}\n\nvoid Hello::helloWorld()\n{\n    acutPrintf(L&quot;\u5f00\u59cb\u5012\u8ba1\u65f6:\\n&quot;); \/\/ \u4f7f\u7528\u548c C \u8bed\u8a00\u7684 printf \u5dee\u4e0d\u591a\uff0c\u7528\u4e8e\u5728 CAD \u4e2d\u6253\u5370\u8f93\u51fa\n    SetTimer(nullptr, 1, 500, TimerProc); \/\/ \u8bbe\u7f6e\u5b9a\u65f6\u5668\uff0c0.5s\u89e6\u53d1\u4e00\u6b21\u3002ObjectARX \u5f15\u7528\u4e86 Windows API\uff0c\u53ef\u4ee5\u4f7f\u7528\u7cfb\u7edf API \u7684\u51fd\u6570\n}<\/code><\/pre>\n<p>acrxEntryPoint.cpp \u5bf9\u4e8e\u5f00\u53d1\u8005\u6765\u8bf4\u662f\u76f4\u63a5\u7684\u5165\u53e3\u4f4d\u7f6e\uff0c\u5f15\u7528\u4e00\u4e0b\u81ea\u5b9a\u4e49\u7684\u7c7b\uff0c\u5206\u522b\u653e\u7f6e\u521d\u59cb\u5316\u548c\u5378\u8f7d\u51fd\u6570<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2024\/07\/image-1722952385633.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 746px; --smush-placeholder-aspect-ratio: 746\/734;\" \/><\/p>\n<p>\u8c03\u8bd5\u8fd0\u884c\uff0c\u6d4b\u8bd5 <strong>hello<\/strong> \u547d\u4ee4<br \/>\n<img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2024\/07\/image-1722952121770.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 358px; --smush-placeholder-aspect-ratio: 358\/186;\" \/><\/p>\n<p><img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2024\/07\/image-1722952151669.png\" alt=\"file\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 1338px; --smush-placeholder-aspect-ratio: 1338\/400;\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u73af\u5883 AutoCAD \u673a\u68b0\u7248 2025 ObjectARX 2025 Visual Studio 2022 O [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"_lmt_disableupdate":"no","_lmt_disable":"no","footnotes":""},"categories":[1,616,589,621,593],"tags":[],"class_list":["post-16635","post","type-post","status-publish","format-standard","hentry","category-all","category-autocad","category-c-c","category-objectarx","category-windows-api"],"modified_by":"IYATT-yx","_links":{"self":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/16635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16635"}],"version-history":[{"count":0,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/16635\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}