{"id":258,"date":"2004-04-20T10:16:48","date_gmt":"2004-04-20T08:16:48","guid":{"rendered":"http:\/\/10.0.0.2\/wordpress\/?p=258"},"modified":"2004-04-20T10:16:48","modified_gmt":"2004-04-20T08:16:48","slug":"shellexecuteex","status":"publish","type":"post","link":"https:\/\/www.switchbl8.nl\/blog\/2004\/04\/shellexecuteex\/","title":{"rendered":"ShellExecuteEx"},"content":{"rendered":"<p>Yesterday I was working on an application (not WRap) that works with RTF documents. I load them into a <a href=\"http:\/\/www.trichview.com\/\">RichViewEdit<\/a>, and the user has the ability to do basic editing. To enable full-scale editing, I thought it would be nice to have a button that started Word with the appropriate document. So far so good.<\/p>\n<p>Word opens, the document is loaded, document can be amended, saved, whatever. Exit Word. Oh my, I have to reload the document into my RichViewEdit. Easy. But&#8230;hey&#8230;wait a second. How do I know if the user is done editing in Word?<\/p>\n<p>[<a href=\"http:\/\/www.google.com\/\">Google<\/a> searching heard in the background]<\/p>\n<p>I found <a href=\"http:\/\/delphi.about.com\/library\/weekly\/aa082499.htm\">this page<\/a> that basically has the answer. And indeed, basically it works. The program starts Word with the correct document, and if I close it, I&#8217;m back in my application. But&#8230;whenever I change the document and close Word (Do you wish to save&#8230;blablabla) something goes wrong. Word does not close, and I have to close it via CTRL-ALT-DEL. I can&#8217;t figure out what goes wrong, since the flow works whenever I don&#8217;t change the document. What&#8217;s the difference?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I was working on an application (not WRap) that works with RTF documents. I load them into a RichViewEdit, and the user has the ability to do basic editing. To enable full-scale editing, I thought it would be nice to have a button that started Word with the appropriate document. So far so good. <a href='https:\/\/www.switchbl8.nl\/blog\/2004\/04\/shellexecuteex\/' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[],"class_list":["post-258","post","type-post","status-publish","format-standard","hentry","category-delphi","category-41-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts\/258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/comments?post=258"}],"version-history":[{"count":0,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/posts\/258\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/media?parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/categories?post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.switchbl8.nl\/blog\/wp-json\/wp\/v2\/tags?post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}