FXText setSelection

"John Selverian" <[email protected]> Mon, 22 Sep 2025 14:13:16 -0400
Newsgroups gmane.comp.lib.fox-toolkit.user
Organization JAHM Software
Message-ID <[email protected]>
This is a multipart message in MIME format.

--===============3297731266838896675==
Content-Type: multipart/related;
	boundary="----=_NextPart_000_001A_01DC2BCB.0AB56DD0"
Content-Language: en-us

This is a multipart message in MIME format.

------=_NextPart_000_001A_01DC2BCB.0AB56DD0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_001B_01DC2BCB.0AB56DD0"


------=_NextPart_001_001B_01DC2BCB.0AB56DD0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit



I have an FXText control and I use the following to select all of
the text:

 

 

                // select all

                text->setSelection(0, text->getLength(), false);

 

 

it works fine but what I run "Code Analysis" in MSVS I get the
following warning:

 

 

warning C6385: Reading invalid data from 'this->text':  the
readable size is '8' bytes, but '261864' bytes may be read.

 

 

I get a similar warning:

 

warning C6386: Buffer overrun while writing to '_x_orig[iCurve]':
the writable size is 'numDataPoints*8' bytes, but '16' bytes
might be written.

 

 

With the code below:

 

 

 

                // copy data to local arrays

                for (int iCurve = 0; iCurve < _numCurves;
iCurve++)

                {

                                for (int i = 0; i <
_numDataPoints[iCurve]; i++)

                                {

                                                _x[iCurve][i] =
_x_orig[iCurve][i] = plotDataArray[iCurve].x[i];

                                                _y[iCurve][i] =
_y_orig[iCurve][i] = plotDataArray[iCurve].y[i];

                                }

                }

 

 

 

 

What does this mean?

 

 

 

 

Kind regards,

 

js


------=_NextPart_001_001B_01DC2BCB.0AB56DD0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta name=3D"Microsoft =
Theme 2.00" content=3D"Concrete 011"><meta http-equiv=3DContent-Type =
content=3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator =
content=3D"Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	font-size:12.0pt;
	font-family:"Verdana",sans-serif;
	color:#434343;
	mso-ligatures:standardcontextual;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Aptos",serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=3Dwhite =
background=3D"cid:[email protected]" lang=3DEN-US =
link=3D"#148120" vlink=3D"#1E3C22" style=3D'word-wrap:break-word'><img =
src=3D"cid:[email protected]" =
v:src=3D"cid:[email protected]" v:shapes=3D"_x0000_Mail" =
width=3D0 height=3D0 class=3Dshape =
style=3D'display:none;width:0;height:0'><!--[if gte mso 9]><xml>
<v:background id=3D"_x0000_s1025" o:bwmode=3D"white" =
o:targetscreensize=3D"1024,768">
<v:fill src=3D"cid:[email protected]" =
o:title=3D"background_concrete" type=3D"frame" />
</v:background></xml><![endif]--><div class=3DWordSection1><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>I =
have an FXText control and I use the following to select all of the =
text:<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; // select all<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; text-&gt;setSelection(0, text-&gt;getLength(), =
false);<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>it =
works fine but what I run &#8220;Code Analysis&#8221; in MSVS I get the =
following warning:<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>war=
ning C6385: Reading invalid data from 'this-&gt;text':&nbsp; the =
readable size is '8' bytes, but '261864' bytes may be =
read.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>I =
get a similar warning:<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>war=
ning C6386: Buffer overrun while writing to '_x_orig[iCurve]':&nbsp; the =
writable size is 'numDataPoints*8' bytes, but '16' bytes might be =
written.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>Wit=
h the code below:<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; // copy data to local arrays<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; for (int iCurve =3D 0; iCurve &lt; _numCurves; =
iCurve++)<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; {<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i =3D 0; i &lt; =
_numDataPoints[iCurve]; i++)<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
_x[iCurve][i] =3D _x_orig[iCurve][i] =3D =
plotDataArray[iCurve].x[i];<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
_y[iCurve][i] =3D _y_orig[iCurve][i] =3D =
plotDataArray[iCurve].y[i];<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; }<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>Wha=
t does this mean?<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext;mso-=
ligatures:none'>Kind regards,<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext;mso-=
ligatures:none'><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext;mso-=
ligatures:none'>js<o:p></o:p></span></p></div></body></html>
------=_NextPart_001_001B_01DC2BCB.0AB56DD0--

------=_NextPart_000_001A_01DC2BCB.0AB56DD0
Content-Type: image/gif;
	name="image001.gif"
Content-Transfer-Encoding: base64
Content-ID: <[email protected]>

R0lGODlhHwAfAIAAAODg4AAAACH5BAAAAAAALAAAAAAfAB8AAAIdhI+py+0Po5y02ouz3rz7D4bi
SJbmiabqyrbuOxUAOw==

------=_NextPart_000_001A_01DC2BCB.0AB56DD0--



--===============3297731266838896675==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============3297731266838896675==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Foxgui-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/foxgui-users

--===============3297731266838896675==--