{"id":28443,"date":"2007-01-11T10:00:02","date_gmt":"2007-01-11T10:00:02","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2007\/01\/11\/how-do-i-put-more-than-32000-characters-into-a-rich-text-control\/"},"modified":"2007-01-11T10:00:02","modified_gmt":"2007-01-11T10:00:02","slug":"how-do-i-put-more-than-32000-characters-into-a-rich-text-control","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20070111-02\/?p=28443","title":{"rendered":"How do I put more than 32,000 characters into a rich text control?"},"content":{"rendered":"<p>\n<a HREF=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2007\/01\/10\/1444814.aspx\">\nLast time we looked at loading an entire file into a rich text\ncontrol<\/a>.\nThe code runs great, until you try to use it to display a\nlicense agreement provided by your legal department, and then\nsome paranoid user reports that they can&#8217;t read past page seven.\n(What, somebody reads those things?)\nWhat&#8217;s going on?\n<\/p>\n<p>\nIf you don&#8217;t specify otherwise,\nthe maximum number of characters in a\nrich edit control is 32,767 charaters.\n(This limit exists for compatibility with the original rich edit control.)\nYou can raise the limit with the <code>EM_EXLIMITTEXT<\/code> message.\nTherefore, we need to slip the line\n<\/p>\n<pre>\nSendMessage(hwnd, EM_EXLIMITTEXT, 0, -1);\n<\/pre>\n<p>\ninto the program before it calls\n<code>FillRichEditFromStream<\/code>.\n<\/p>\n<p>\nNext time, the mystery of rich edit printing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last time we looked at loading an entire file into a rich text control. The code runs great, until you try to use it to display a license agreement provided by your legal department, and then some paranoid user reports that they can&#8217;t read past page seven. (What, somebody reads those things?) What&#8217;s going on? [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-28443","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Last time we looked at loading an entire file into a rich text control. The code runs great, until you try to use it to display a license agreement provided by your legal department, and then some paranoid user reports that they can&#8217;t read past page seven. (What, somebody reads those things?) What&#8217;s going on? [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/28443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=28443"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/28443\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=28443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=28443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=28443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}