将较大的字符串粘贴到文本框控件(MFC)中可能会出现啥问题
Posted
技术标签:
【中文标题】将较大的字符串粘贴到文本框控件(MFC)中可能会出现啥问题【英文标题】:What could be going wrong pasting a largish string into a textbox control (MFC)将较大的字符串粘贴到文本框控件(MFC)中可能会出现什么问题 【发布时间】:2015-01-21 02:19:16 【问题描述】:我有 10965 个字符的大文本。确切的文字是:
http://abcx57.al2.testdomain.com:27000/arcs/select/?defType=edismax&timeAllowed=600000&pieces=arcs57.zx3.mycompany.com:27000/arcs,arcs59.zx3.mycompany.com:27000/arcs,&start =0&rows=50&q=-jid%3a25003-&debugQuery=false&sort=mtm+desc,score+desc&fq=---clid%3a10-+OR+-clid%3a12-+OR+-clid%3a17-+OR+-clid%3a16- +OR+-clid%3a26-+OR+-clid%3a30-+OR+-clid%3a104-+OR+-clid%3a106-+OR+-clid%3a108-+OR+-clid%3a109-+OR+-clid%3a117-+ OR+-clid%3a118-+OR+-clid%3a111-+OR+-clid%3a122-+OR+-clid%3a123-+OR+-clid%3a139-+OR+-clid%3a112-+OR+-clid%3a67-+OR+ -clid%3a146-+OR+-clid%3a167-+OR+-clid%3a195-+OR+-clid%3a45-+OR+-clid%3a46-+OR+-clid%3a60-+OR+-clid%3a196-+OR+- clid%3a698-+OR+-clid%3a701-+OR+-clid%3a712-+OR+-clid%3a643-+OR+-clid%3a771-+OR+-clid%3a210-+OR+-clid%3a772-+OR+-clid %3a775-+OR+-clid%3a461-+OR+-clid%3a777-+OR+-clid%3a657-+OR+-clid%3a144-+OR+-clid%3a533-+OR+-clid%3a720-+OR+-clid% 3a170-+OR+-clid%3a207-+OR+-clid%3a209-+OR+-clid%3a227-+OR+-clid%3a241-+OR+-clid%3a615-+OR+-clid%3a637-+OR+-clid%3a642 -+OR+-clid%3a468- +OR+-clid%3a476-+OR+-clid%3a482-+OR+-clid%3a296-+OR+-clid%3a264-+OR+-clid%3a267-+OR+-clid%3a270-+OR+-clid%3a271-+ OR+-clid%3a279-+OR+-clid%3a280-+OR+-clid%3a286-+OR+-clid%3a292-+OR+-clid%3a723-+OR+-clid%3a724-+OR+-clid%3a725-+OR+ -clid%3a738-+OR+-clid%3a740-+OR+-clid%3a741-+OR+-clid%3a742-+OR+-clid%3a743-+OR+-clid%3a744-+OR+-clid%3a745-+OR+- clid%3a747-+OR+-clid%3a748-+OR+-clid%3a749-+OR+-clid%3a750-+OR+-clid%3a752-+OR+-clid%3a758-+OR+-clid%3a763-+OR+-clid %3a333-+OR+-clid%3a690-+OR+-clid%3a691-+OR+-clid%3a262-+OR+-clid%3a653-+OR+-clid%3a656-+OR+-clid%3a658--+OR+--卷%3a2-+OR+-卷%3a3-+OR+-卷%3a17-+OR+-卷%3a47-+OR+-卷%3a48-+OR+-卷%3a53-+OR+-卷%3a54-+OR+-卷%3a63-+OR+-roll%3a64-+OR+-roll%3a65-+OR+-roll%3a97-+OR+-roll%3a102-+OR+-roll%3a224-+OR+-roll%3a227-+OR+-roll% 3a228-+OR+-roll%3a242-+OR+-roll%3a289-+OR+-roll%3a305-+OR+-roll%3a306-+OR+-roll%3a327-+OR+-roll%3a328-+OR+-roll%3a329 -+OR+-roll%3a346-+OR+-roll%3a347-+OR+-roll%3a348-+OR+-roll%3a349-+OR+-roll%3a350-+OR+-roll%3a354-+OR +-roll%3a428-+OR+-roll%3a429-+OR+-roll%3a617-+OR+-roll%3a668-+OR+-roll%3a739-+OR+-roll%3a880-+OR+-roll%3a988-+OR+ -roll%3a992-+OR+-roll%3a1065-+OR+-roll%3a1073-+OR+-roll%3a1074-+OR+-roll%3a1075-+OR+-roll%3a1078-+OR+-roll%3a1079-+OR+-卷%3a1080-+OR+-卷%3a1081-+OR+-卷%3a1082-+OR+-卷%3a1083-+OR+-卷%3a1084-+OR+-卷%3a1085-+OR+-卷%3a1086-+OR+-卷%3a1087-+OR+-roll%3a1088-+OR+-roll%3a1090-+OR+-roll%3a1154-+OR+-roll%3a1155-+OR+-roll%3a1159-+OR+-roll%3a1163-+OR+-roll% 3a1179-+OR+-roll%3a1209-+OR+-roll%3a1210-+OR+-roll%3a1211-+OR+-roll%3a1216-+OR+-roll%3a1386-+OR+-roll%3a1388-+OR+-roll%3a1445 -+OR+-roll%3a1488-+OR+-roll%3a1503-+OR+-roll%3a1556-+OR+-roll%3a1678-+OR+-roll%3a1701-+OR+-roll%3a1906-+OR+-roll%3a1907- +OR+-roll%3a1955-+OR+-roll%3a2080-+OR+-roll%3a2083-+OR+-roll%3a2084-+OR+-roll%3a2085-+OR+-roll%3a2086-+OR+-roll%3a2087-+ OR+-roll%3a2088-+OR+-roll%3a2089-+OR+-roll%3a2090-+OR+-roll%3a2091-+OR+-roll%3a2092-+OR+-roll%3a2131-+OR+-roll%3a2132-+OR+ -roll%3a2133-+OR+-roll%3a2134-+OR+-rol l%3a2279-+OR+-roll%3a2280-+OR+-roll%3a2282-+OR+-roll%3a2457-+OR+-roll%3a2620-+OR+-roll%3a2621-+OR+-roll%3a2683-+OR+-roll %3a2766-+OR+-roll%3a2771-+OR+-roll%3a2772-+OR+-roll%3a2870-+OR+-roll%3a3067-+OR+-roll%3a3279-+OR+-roll%3a3286-+OR+-roll% 3a3291-+OR+-roll%3a3398-+OR+-roll%3a3542-+OR+-roll%3a3740-+OR+-roll%3a3873-+OR+-roll%3a3917-+OR+-roll%3a3921-+OR+-roll%3a4043 -+OR+-roll%3a4150-+OR+-roll%3a4369-+OR+-roll%3a4440-+OR+-roll%3a4441-+OR+-roll%3a4442-+OR+-roll%3a4443-+OR+-roll%3a4811- +OR+-roll%3a4814-+OR+-roll%3a4914-+OR+-roll%3a5223-+OR+-roll%3a5237-+OR+-roll%3a5265-+OR+-roll%3a5290-+OR+-roll%3a5545-+ OR+-roll%3a5546-+OR+-roll%3a5604-+OR+-roll%3a5605-+OR+-roll%3a5827-+OR+-roll%3a5828-+OR+-roll%3a6016-+OR+-roll%3a6605-+OR+ -roll%3a7099-+OR+-roll%3a7625-+OR+-roll%3a7842-+OR+-roll%3a7843-+OR+-roll%3a8160-+OR+-roll%3a8260-+OR+-roll%3a8261-+OR+-卷%3a8263-+OR+-卷%3a8264-+OR+-卷%3a8313-+OR+-卷%3a8381-+OR+-卷%3a8382-+OR+-卷%3a8703-+OR+-卷%3a8820-+OR+-卷%3a8911-+OR+-滚动%3a8912-+OR+-卷%3a8913-+OR+-卷%3a8914-+OR+-卷%3a9096-+OR+-卷%3a9635-+OR+-卷%3a10265-+OR+-卷%3a10293-+OR+-卷%3a10294-+OR+-卷%3a10394-+OR+-roll%3a10399-+OR+-roll%3a10402-+OR+-roll%3a10467-+OR+-roll%3a10548-+OR+-roll%3a11286-+OR+-roll%3a11331-+OR+-roll% 3a11406-+OR+-roll%3a11472-+OR+-roll%3a11541-+OR+-roll%3a11986-+OR+-roll%3a11995-+OR+-roll%3a12139-+OR+-roll%3a12225-+OR+-roll%3a12452 -+OR+-roll%3a12453-+OR+-roll%3a12481-+OR+-roll%3a13623-+OR+-roll%3a13991-+OR+-roll%3a14103-+OR+-roll%3a14105-+OR+-roll%3a14106- +OR+-roll%3a14114-+OR+-roll%3a14116-+OR+-roll%3a14122-+OR+-roll%3a14225-+OR+-roll%3a14285-+OR+-roll%3a14403-+OR+-roll%3a14461-+ OR+-roll%3a15345-+OR+-roll%3a15347-+OR+-roll%3a15348-+OR+-roll%3a15349-+OR+-roll%3a15351-+OR+-roll%3a15428-+OR+-roll%3a15573-+OR+ -roll%3a15579-+OR+-roll%3a15580-+OR+-roll%3a15581-+OR+-roll%3a15642-+OR+-roll%3a15712-+OR+-roll%3a15713-+OR+-roll%3a15772-+OR+-卷%3a15780-+OR+-卷%3a15841-+OR+-卷%3a15853-+OR+-卷%3a16079-+OR+-卷%3a16231-+OR+-卷%3a16232-+ OR+-roll%3a16255-+OR+-roll%3a16381-+OR+-roll%3a16927-+OR+-roll%3a16928-+OR+-roll%3a16930-+OR+-roll%3a16931-+OR+-roll%3a17094-+OR+ -roll%3a17275-+OR+-roll%3a17276-+OR+-roll%3a17468-+OR+-roll%3a17537-+OR+-roll%3a17628-+OR+-roll%3a17632-+OR+-roll%3a17813-+OR+-卷%3a18243-+OR+-卷%3a18332-+OR+-卷%3a18334-+OR+-卷%3a18339-+OR+-卷%3a18340-+OR+-卷%3a18873-+OR+-卷%3a18882-+OR+-卷%3a19373-+OR+-roll%3a19399-+OR+-roll%3a19578-+OR+-roll%3a19579-+OR+-roll%3a19582-+OR+-roll%3a19583-+OR+-roll%3a19584-+OR+-roll% 3a19921-+OR+-roll%3a20147-+OR+-roll%3a20482-+OR+-roll%3a20492-+OR+-roll%3a21022-+OR+-roll%3a21026-+OR+-roll%3a21027-+OR+-roll%3a21211 -+OR+-roll%3a21212-+OR+-roll%3a21974-+OR+-roll%3a21975-+OR+-roll%3a21978-+OR+-roll%3a21979-+OR+-roll%3a21980-+OR+-roll%3a21989- +OR+-roll%3a21990-+OR+-roll%3a22006-+OR+-roll%3a22530-+OR+-roll%3a22531-+OR+-roll%3a22712-+OR+-roll%3a22713-+OR+-roll%3a22729-+ OR+-roll%3a22968-+OR+-roll%3a22969-+OR+-roll%3a23211-+OR+-roll%3a23451-+OR+-roll%3a23452-+OR+-roll%3 a24134-+OR+-roll%3a24136-+OR+-roll%3a24137-+OR+-roll%3a24138-+OR+-roll%3a24139-+OR+-roll%3a24140-+OR+-roll%3a24141-+OR+-roll%3a24142 -+OR+-roll%3a24143-+OR+-roll%3a24144-+OR+-roll%3a24145-+OR+-roll%3a24146-+OR+-roll%3a24147-+OR+-roll%3a24148-+OR+-roll%3a24149- +OR+-roll%3a24150-+OR+-roll%3a24153-+OR+-roll%3a24154-+OR+-roll%3a24155-+OR+-roll%3a24156-+OR+-roll%3a24157-+OR+-roll%3a24158-+ OR+-roll%3a24159-+OR+-roll%3a24160-+OR+-roll%3a24163-+OR+-roll%3a24164-+OR+-roll%3a24165-+OR+-roll%3a24166-+OR+-roll%3a24167-+OR+ -roll%3a24168-+OR+-roll%3a24170-+OR+-roll%3a24171-+OR+-roll%3a24172-+OR+-roll%3a24176-+OR+-roll%3a24177-+OR+-roll%3a24180-+OR+-卷%3a24181-+OR+-卷%3a24184-+OR+-卷%3a24185-+OR+-卷%3a24358-+OR+-卷%3a24729-+OR+-卷%3a24795-+OR+-卷%3a24800-+OR+-卷%3a26520-+OR+-roll%3a27157-+OR+-roll%3a27761-+OR+-roll%3a27762-+OR+-roll%3a27763-+OR+-roll%3a27872-+OR+-roll%3a28121-+OR+-roll% 3a28263-+OR+-roll%3a28516-+OR+-roll%3a29106-+OR+-roll%3a29163-+OR+-roll%3a29321-+OR+-roll%3a29332-+OR +-roll%3a29508-+OR+-roll%3a29565-+OR+-roll%3a29566-+OR+-roll%3a30231-+OR+-roll%3a30536-+OR+-roll%3a30992-+OR+-roll%3a31000-+OR+ -roll%3a31078-+OR+-roll%3a31081-+OR+-roll%3a31082-+OR+-roll%3a31086-+OR+-roll%3a31090-+OR+-roll%3a31092-+OR+-roll%3a31095-+OR+-卷%3a31261-+OR+-卷%3a31364-+OR+-卷%3a32014-+OR+-卷%3a32017-+OR+-卷%3a32070-+OR+-卷%3a32082-+OR+-卷%3a32086-+OR+-卷%3a32133-+OR+-roll%3a32138-+OR+-roll%3a32148-+OR+-roll%3a32200-+OR+-roll%3a32201-+OR+-roll%3a32202-+OR+-roll%3a32203-+OR+-roll% 3a32220-+OR+-roll%3a32237-+OR+-roll%3a32238-+OR+-roll%3a32318-+OR+-roll%3a32319-+OR+-roll%3a32320-+OR+-roll%3a32321-+OR+-roll%3a32379 -+OR+-roll%3a32383-+OR+-roll%3a32446-+OR+-roll%3a32692-+OR+-roll%3a32939-+OR+-roll%3a33004-+OR+-roll%3a33261-+OR+-roll%3a33673- +OR+-roll%3a34328-+OR+-roll%3a36144-+OR+-roll%3a36145-+OR+-roll%3a36289-+OR+-roll%3a36290-+OR+-roll%3a38055-+OR+-roll%3a38431-+ OR+-roll%3a38432-+OR+-roll%3a38433-+OR+-roll%3a39082-+OR+-roll%3a39083-+OR+-roll%3a40007-+OR+-roll%3a4 0213-+OR+-roll%3a40227-+OR+-roll%3a41794-+OR+-roll%3a42076-+OR+-roll%3a42361-+OR+-roll%3a42362-+OR+-roll%3a42371-+OR+-roll%3a42373 -+OR+-roll%3a42376-+OR+-roll%3a42378-+OR+-roll%3a42389-+OR+-roll%3a42393-+OR+-roll%3a42424-+OR+-roll%3a42425-+OR+-roll%3a42432- +OR+-roll%3a42434-+OR+-roll%3a42442-+OR+-roll%3a42443-+OR+-roll%3a42454-+OR+-roll%3a42455-+OR+-roll%3a42456-+OR+-roll%3a42457-+ OR+-roll%3a42458-+OR+-roll%3a42459-+OR+-roll%3a42460-+OR+-roll%3a42461-+OR+-roll%3a42466-+OR+-roll%3a42467-+OR+-roll%3a42468-+OR+ -roll%3a42469-+OR+-roll%3a42471-+OR+-roll%3a42473-+OR+-roll%3a42474-+OR+-roll%3a42479-+OR+-roll%3a42494-+OR+-roll%3a42508-+OR+-卷%3a42510-+OR+-卷%3a42526-+OR+-卷%3a42552-+OR+-卷%3a42553-+OR+-卷%3a42555-+OR+-卷%3a42584-+OR+-卷%3a42603-+OR+-卷%3a42609-+OR+-roll%3a42640-+OR+-roll%3a42671-+OR+-roll%3a42680-+OR+-roll%3a42715-+OR+-roll%3a42726-+OR+-roll%3a42764-+OR+-roll% 3a42767-+OR+-roll%3a27612-+OR+-roll%3a27613-+OR+-roll%3a27617-+OR+-roll%3a27615-+OR+-roll%3a27616-+OR+- roll%3a28199-+OR+-roll%3a28200---&fq=--datatype%3a1-+OR+-datatype%3a2-+OR+-datatype%3a3--&fq=-cistate%3a17-&hl=true&hl.fl=conv ,文件夹,url,fmsmtp,tosmtp,ccsmtp,fromdisp,todisp,ccdisp,bccdisp&place=true&place.query=-mtm%3a%5b2015-01-19T00%3a00%3a00Z+TO+2015-01-19T23%3a59%3a59Z% 5d-&place.query=-mtm%3a%5b2015-01-14T00%3a00%3a00Z+TO+2015-01-20T23%3a59%3a59Z%5d-&place.query=-mtm%3a%5b2014-12-22T00% 3a00%3a00Z+TO+2015-01-20T23%3a59%3a59Z%5d-&place.query=-mtm%3a%5b2014-01-21T00%3a00%3a00Z+TO+2015-01-20T23%3a59%3a59Z%5d -&place.query=-mtm%3a%5b1970-01-01T00%3a00%3a00Z+TO+2014-01-20T23%3a59%3a59Z%5d-&place.query=-szkb%3a%5b0+TO+1048576%5d -&place.query=-szkb%3a%5b1048576+TO+5242880%5d-&place.query=-szkb%3a%5b5242880+TO+10485760%5d-&place.query=-szkb%3a%5b10485760+TO+9007199254740992% 5d-&place.field=ext_name&f.ext_name.place.limit=4&f.ext_name.place.query=_val_%3acore&f.ext_name.place.mincount=1&place.field=from_string&f.from_string.place.limit=4&f.from_string.place。查询=_val_%3acore&f.from_strin g.place.mincount=1&place.field=clid&f.clid.place.limit=4&f.clid.place.query=_val_%3ascore&f.clid.place.mincount=1&place.field=hasattach&f.hasattach.place.limit=4&f. hasattach.place.query=_val_%3ascore&f.hasattach.place.mincount=1&place.field=datatype&f.datatype.place.limit=4&f.datatype.place.query=_val_%3ascore&f.datatype.place.mincount=1&place.field= zxfilerdisp&f.zxfilerdisp.place.limit=4&f.zxfilerdisp.place.query=_val_%3ascore&f.zxfilerdisp.place.mincount=1&place.field=folder_string&f.folder_string.place.limit=4&f.folder_string.place.query=_val_%3ascore&f. folder_string.place.mincount=1&fl=atyp,ccn,clid,roll,szkb,mtm,accesstime,jid,cijid,bktm,afid,afof,afln,conv,conv,mtm,atto,to,from,cc,bcc, lnks,lnkows,tosmtp,fmsmtp,ccsmtp,bcsmtp,rclst,fmrclst,msgflags,url,crtm,contenttype,ext_name,cistate,contentid,dcflags,dozxector,文件夹,文件夹,zxex,xheader,folder_string,zxturboguid,hasattach,zxstub, fromdisp,todisp,ccdisp,bccdisp,zxfilerdisp,zxrefcopyguid,zxref我需要将其粘贴到基于对话框的 MFC 应用程序的文本框中。如果我粘贴此文本,则该文本根本不会显示在控件中。我确实看到了插入符号,可以移动它,使用 home 键或 end 键,但没有显示任何文本。
使用 DDX 连接的内部变量 m_url 包含整个字符串,但它只是不显示。
相同的代码适用于小字符串。以下是我可以成功粘贴到文本框中并在那里显示的最大值:
http://abcx57.al2.testdomain.com:27000/arcs/select/?defType=edismax&timeAllowed=600000&pieces=arcs57.zx3.mycompany.com:27000/arcs,arcs59.zx3.mycompany.com:27000/arcs,&start =0&rows=50&q=-jid%3a25003-&debugQuery=false&sort=mtm+desc,score+desc&fq=---clid%3a10-+OR+-clid%3a12-+OR+-clid%3a17-+OR+-clid%3a16- +OR+-clid%3a26-+OR+-clid%3a30-+OR+-clid%3a104-+OR+-clid%3a106-+OR+-clid%3a108-+OR+-clid%3a109-+OR+-clid%3a117-+ OR+-clid%3a118-+OR+-clid%3a111-+OR+-clid%3a122-+OR+-clid%3a123-+OR+-clid%3a139-+OR+-clid%3a112-+OR+-clid%3a67-+OR+ -clid%3a146-+OR+-clid%3a167-+OR+-clid%3a195-+OR+-clid%3a45-+OR+-clid%3a46-+OR+-clid%3a60-+OR+-clid%3a196-+OR+- clid%3a698-+OR+-clid%3a701-+OR+-clid%3a712-+OR+-clid%3a643-+OR+-clid%3a771-+OR+-clid%3a210-+OR+-clid%3a772-+OR+-clid %3a775-+OR+-clid%3a461-+OR+-clid%3a777-+OR+-clid%3a657-+OR+-clid%3a144-+OR+-clid%3a533-+OR+-clid%3a720-+OR+-clid% 3a170-+OR+-clid%3a207-+OR+-clid%3a209-+OR+-clid%3a227-+OR+-clid%3a241-+OR+-clid%3a615-+OR+-clid%3a637-+OR+-clid%3a642 -+OR+-clid%3a468- +OR+-clid%3a476-+OR+-clid%3a482-+OR+-clid%3a296-+OR+-clid%3a264-+OR+-clid%3a267-+OR+-clid%3a270-+OR+-clid%3a271-+ OR+-clid%3a279-+OR+-clid%3a280-+OR+-clid%3a286-+OR+-clid%3a292-+OR+-clid%3a723-+OR+-clid%3a724-+OR+-clid%3a725-+OR+ -clid%3a738-+OR+-clid%3a740-+OR+-clid%3a741-+OR+-clid%3a742-+OR+-clid%3a743-+OR+-clid%3a744-+OR+-clid%3a745-+OR+- clid%3a747-+OR+-clid%3a748-+OR+-clid%3a749-+OR+-clid%3a750-+OR+-clid%3a752-+OR+-clid%3a758-+OR+-clid%3a763-+OR+-clid %3a333-+OR+-clid%3a690-+OR+-clid%3a691-+OR+-clid%3a262-+OR+-clid%3a653-+OR+-clid%3a656-+OR+-clid%3a658--+OR+--卷%3a2-+OR+-卷%3a3-+OR+-卷%3a17-+OR+-卷%3a47-+OR+-卷%3a48-+OR+-卷%3a53-+OR+-卷%3a54-+OR+-卷%3a63-+OR+-roll%3a64-+OR+-roll%3a65-+OR+-roll%3a97-+OR+-roll%3a102-+OR+-roll%3a224-+OR+-roll%3a227-+OR+-roll% 3a228-+OR+-roll%3a242-+OR+-roll%3a289-+OR+-roll%3a305-+OR+-roll%3a306-+OR+-roll%3a327-+OR+-roll%3a328-+OR+-roll%3a329 -+OR+-roll%3a346-+OR+-roll%3a347-+OR+-roll%3a348-+OR+-roll%3a349-+OR+-roll%3a350-+OR+-roll%3a354-+OR +-roll%3a428-+OR+-roll%3a429-+OR+-roll%3a617-+OR+-roll%3a668-+OR+-roll%3a739-+OR+-roll%3a880-+OR+-roll%3a988-+OR+ -roll%3a992-+OR+-roll%3a1065-+OR+-roll%3a1073-+OR+-roll%3a1074-+OR+-roll%3a1075-+OR+-roll%3a1078-+OR+-roll%3a1079-+OR+-卷%3a1080-+OR+-卷%3a1081-+OR+-卷%3a1082-+OR+-卷%3a1083-+OR+-卷%3a1084-+OR+-卷%3a1085-+OR+-卷%3a1086-+OR+-卷%3a1087-+OR+-roll%3a1088-+OR+-roll%3a1090-+OR+-roll%3a1154-+OR+-roll%3a1155-+OR+-roll%3a1159-+OR+-roll%3a1163-+OR+-roll% 3a1179-+OR+-roll%3a1209-+OR+-roll%3a1210-+OR+-roll%3a1211-+OR+-roll%3a1216-+OR+-roll%3a1386-+OR+-roll%3a1388-+OR+-roll%3a1445 -+OR+-roll%3a1488-+OR+-roll%3a1503-+OR+-roll%3a1556-+OR+-roll%3a1678-+OR+-roll%3a1701-+OR+-roll%3a1906-+OR+-roll%3a1907- +OR+-roll%3a1955-+OR+-roll%3a2080-+OR+-roll%3a2083-+OR+-roll%3a2084-+OR+-roll%3a2085-+OR+-roll%3a2086-+OR+-roll%3a2087-+ OR+-roll%3a2088-+OR+-roll%3a2089-+OR+-roll%3a2090-+OR+-roll%3a2091-+OR+-roll%3a2092-+OR+-roll%3a2131-+OR+-roll%3a2132-+OR+ -roll%3a2133-+OR+-roll%3a2134-+OR+-rol l%3a2279-+OR+-roll%3a2280-+OR+-roll%3a2282-+OR+-roll%3a2457-+OR+-roll%3a2620-+OR+-roll%3a2621-+OR+-roll%3a2683-+OR+-roll %3a2766-+OR+-roll%3a2771-+OR+-roll%3a2772-+OR+-roll%3a2870-+OR+-roll%3a3067-+OR+-roll%3a3279-+OR+-roll%3a3286-+OR+-roll% 3a3291-+OR+-roll%3a3398-+OR+-roll%3a3542-+OR+-roll%3a3740-+OR+-roll%3a3873-+OR+-roll%3a3917-+OR+-roll%3a3921-+OR+-roll%3a4043 -+OR+-roll%3a4150-+OR+-roll%3a4369-+OR+-roll%3a4440-+OR+-roll%3a4441-+OR+-roll%3a4442-+OR+-roll%3a4443-+OR+-roll%3a4811- +OR+-roll%3a4814-+OR+-roll%3a4914-+OR+-roll%3a5223-+OR+-roll%3a5237-+OR+-roll%3a5265-+OR+-roll%3a5290-+OR+-roll%3a5545-+ OR+-roll%3a5546-+OR+-roll%3a5604-+OR+-roll%3a5605-+OR+-roll%3a5827-+OR+-roll%3a5828-+OR+-roll%3a6016-+OR+-roll%3a6605-+OR+ -roll%3a7099-+OR+-roll%3a7625-+OR+-roll%3a7842-+OR+-roll%3a7843-+OR+-roll%3a8160-+OR+-roll%3a8260-+OR+-roll%3a8261-+OR+-卷%3a8263-+OR+-卷%3a8264-+OR+-卷%3a8313-+OR+-卷%3a8381-+OR+-卷%3a8382-+OR+-卷%3a8703-+OR+-卷%3a8820-+OR+-卷%3a8911-+OR+-滚动%3a8912-+OR+-卷%3a8913-+OR+-卷%3a8914-+OR+-卷%3a9096-+OR+-卷%3a9635-+OR+-卷%3a10265-+OR+-卷%3a10293-+OR+-卷%3a10294-+OR+-卷%3a10394-+OR+-roll%3a10399-+OR+-roll%3a10402-+OR+-roll%3a10467-+OR+-roll%3a10548-+OR+-roll%3a11286-+OR+-roll%3a11331-+OR+-roll% 3a11406-+OR+-roll%3a11472-+OR+-roll%3a11541-+OR+-roll%3a11986-+OR+-roll%3a11995-+OR+-roll%3a12139-+OR+-roll%3a12225-+OR+-roll%3a12452 -+OR+-roll%3a12453-+OR+-roll%3a12481-+OR+-roll%3a13623-+OR+-roll%3a13991-+OR+-roll%3a14103-+OR+-roll%3a14105-+OR+-roll%3a14106- +OR+-roll%3a14114-+OR+-roll%3a14116-+OR+-roll%3a14122-+OR+-roll%3a14225-+OR+-roll%3a14285-+OR+-roll%3a14403-+OR+-roll%3a14461-+ OR+-roll%3a15345-+OR+-roll%3a15347-+OR+-roll%3a15348-+OR+-roll%3a15349-+OR+-roll%3a15351-+OR+-roll%3a15428-+OR+-roll%3a15573-+OR+ -roll%3a15579-+OR+-roll%3a15580-+OR+-roll%3a15581-+OR+-roll%3a15642-+OR+-如果我再输入一个字符,文本框中的文本就会消失。
我使用的是 Visual Studio 2013。行为与 Debug 和 Release Unicode Win32 版本相同。
以前有人遇到过这种情况吗?如何克服这一点?
【问题讨论】:
与其说是重复,因为这个问题是在问如何克服它。 ***.com/questions/180853 可能相关:msdn.microsoft.com/en-us/library/windows/desktop/… 【参考方案1】:我也经历过同样的事情。您可以通过使用 SetLimitText(EM_SETLIMITTEXT ...我认为)来增加字符数量。但是,这不是由于字符数。我相信这与超过 16 位 GDI 限制 32,767 像素有关。单行编辑控件会发生这种情况。如果你有多行,那么它似乎可以很好地包装。
您可以创建一个 IC,并编写一些代码来确定您要显示的文本的宽度。
CDC dc;
dc.CreateIC("display", NULL, NULL, NULL);
CFont* pFont = GetDlgItem(IDC_EDIT1)->GetFont(); // use appropriate ID
CFont* pOldFont = dc.SelectObject(pFont);
CSize sz = dc.GetTextExtent(strYourMaxString); //sz.cx contains your string, probably approaching 32,767
dc.SelectObject(pOldFont);
我的经验:Limits on single line edit control? GDI related?
【讨论】:
以上是关于将较大的字符串粘贴到文本框控件(MFC)中可能会出现啥问题的主要内容,如果未能解决你的问题,请参考以下文章