Re: copy FXTable
Roland Hughes via Foxgui-users <[email protected]> Fri, 17 Oct 2025 08:38:37 -0500
| Newsgroups | gmane.comp.lib.fox-toolkit.user |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============5965060612947673703==
Content-Type: multipart/alternative;
boundary="------------fmFvayIHc7YGdNwzjZj0LJMP"
Content-Language: en-US
This is a multi-part message in MIME format.
--------------fmFvayIHc7YGdNwzjZj0LJMP
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Hopefully I won't confuse anything here.
http://www.fox-toolkit.org/ref/classFX_1_1FXTable.html
virtual long tryHandle
<http://www.fox-toolkit.org/ref/classFX_1_1FXObject.html#a23f54e2d9e11157a8da0ad1d4da7291f>(FXObject
<http://www.fox-toolkit.org/ref/classFX_1_1FXObject.html>*sender,
FXSelector sel, void *ptr)
Try handle message safely, catching certain exceptions.
https://learn.microsoft.com/en-us/answers/questions/4103694/clipboard-problems-(can-not-copy-paste)-in-windows
Didn't read through all of it, but appears Windows 11 has problems with
clipboard ownership and serious problems when clipboard history is enabled.
On 10/17/2025 6:56 AM, John Selverian wrote:
>
> I have the following code which is called when the user clicks a
> button, it copies data in a table and puts it on the clip board. It
> was working fine. After some recent Win11 updates it fails about 1/3
> of the time. When I click the button then paste into Excel I get a
> “cannot paste” error in Excel or if I just paste it into a text editor
> nothing is pasted. So it seems like the copy command in my code is
> failing. I have to click the button 1 or 2 times then it works. Is
> there a way to know if the copy command worked? The code below always
> return a result of 1, even when the copy does not work.
>
> void* ptr = nullptr;
>
> long result = table->handle(this, FXSEL(SEL_COMMAND,
> FXTable::ID_COPY_SEL), ptr);
>
> if (result == 0)
>
> {
>
> FXMessageBox::warning(this, MBOX_OK, "Copy problem", "Could not copy
> the table.");
>
> }
>
> Kind regards,
>
> js
>
>
>
> _______________________________________________
> Foxgui-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/foxgui-users
--
Roland Hughes, President
Logikal Solutions
(630)-205-1593 (cell)
https://theminimumyouneedtoknow.com
https://infiniteexposure.net
https://johnsmith-book.com
--------------fmFvayIHc7YGdNwzjZj0LJMP
Content-Type: multipart/related;
boundary="------------DkeWp0Po0V9bn7d4m3lI2Waf"
--------------DkeWp0Po0V9bn7d4m3lI2Waf
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hopefully I won't confuse anything here.</p>
<p><a class="moz-txt-link-freetext" href="http://www.fox-toolkit.org/ref/classFX_1_1FXTable.html">http://www.fox-toolkit.org/ref/classFX_1_1FXTable.html</a></p>
<table class="memberdecls"
style="font-family: verdana, sans-serif; letter-spacing: normal; orphans: 2; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">
<tbody>
<tr
class="separator:afe0aa05f18857b39099cf9a14978ca91 inherit pub_methods_classFX_1_1FXObject">
<td class="memSeparator" colspan="2"
style="font-size: 10pt; font-family: arial, verdana, sans-serif;"> </td>
</tr>
<tr
class="memitem:a23f54e2d9e11157a8da0ad1d4da7291f inherit pub_methods_classFX_1_1FXObject">
<td class="memItemLeft" align="right" valign="top"
style="font-size: 10pt; font-family: arial, verdana, sans-serif;"><a
id="a23f54e2d9e11157a8da0ad1d4da7291f"
style="color: rgb(153, 51, 0); font-size: 10pt; font-family: arial, verdana, sans-serif; text-decoration: none;"></a>virtual
long </td>
<td class="memItemRight" valign="bottom"
style="font-size: 10pt; font-family: arial, verdana, sans-serif;"><a
class="el"
href="http://www.fox-toolkit.org/ref/classFX_1_1FXObject.html#a23f54e2d9e11157a8da0ad1d4da7291f"
style="color: rgb(153, 51, 0); font-size: 10pt; font-family: arial, verdana, sans-serif; text-decoration: none;">tryHandle</a><span> </span>(<a
class="el"
href="http://www.fox-toolkit.org/ref/classFX_1_1FXObject.html"
style="color: rgb(153, 51, 0); font-size: 10pt; font-family: arial, verdana, sans-serif; text-decoration: none;">FXObject</a><span> </span>*sender,
FXSelector sel, void *ptr)</td>
</tr>
<tr
class="memdesc:a23f54e2d9e11157a8da0ad1d4da7291f inherit pub_methods_classFX_1_1FXObject">
<td class="mdescLeft"
style="font-size: 10pt; font-family: arial, verdana, sans-serif;"> </td>
<td class="mdescRight"
style="font-size: 10pt; font-family: arial, verdana, sans-serif;">Try
handle message safely, catching certain exceptions.<br>
</td>
</tr>
<tr
class="separator:a23f54e2d9e11157a8da0ad1d4da7291f inherit pub_methods_classFX_1_1FXObject">
<td class="memSeparator" colspan="2"
style="font-size: 10pt; font-family: arial, verdana, sans-serif;"> </td>
</tr>
<tr
class="memitem:aaeaaf37ee57d3ddac73d21ceab17a10e inherit pub_methods_classFX_1_1FXObject">
<td class="memItemLeft" align="right" valign="top"
style="font-size: 10pt; font-family: arial, verdana, sans-serif;"><br>
</td>
</tr>
</tbody>
</table>
<br class="Apple-interchange-newline">
<p><a class="moz-txt-link-freetext" href="https://learn.microsoft.com/en-us/answers/questions/4103694/clipboard-problems-(can-not-copy-paste)-in-windows">https://learn.microsoft.com/en-us/answers/questions/4103694/clipboard-problems-(can-not-copy-paste)-in-windows</a></p>
<p>Didn't read through all of it, but appears Windows 11 has
problems with clipboard ownership and serious problems when
clipboard history is enabled.<br>
</p>
<p></p>
<div class="moz-cite-prefix">On 10/17/2025 6:56 AM, John Selverian
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:[email protected]">
<meta name="Microsoft Theme 2.00" content="Concrete 011">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator"
content="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="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--><img
src="cid:[email protected]"
v:src="imap://roland%[email protected]:993/fetch%3EUID%3E.INBOX%3E294508?header=quotebody&part=1.1.2&filename=image001.gif"
v:shapes="_x0000_Mail" width="0" height="0" class="shape"
style="display:none;width:0;height:0"><!--[if gte mso 9]><xml>
<v:background id="_x0000_s1025" o:bwmode="white" o:targetscreensize="1024,768">
<v:fill src="imap://roland%[email protected]:993/fetch%3EUID%3E.INBOX%3E294508?header=quotebody&part=1.1.2&filename=image001.gif" o:title="background_concrete" type="frame" />
</v:background></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext">I
have the following code which is called when the user clicks
a button, it copies data in a table and puts it on the clip
board. It was working fine. After some recent Win11 updates
it fails about 1/3 of the time. When I click the button then
paste into Excel I get a “cannot paste” error in Excel or if
I just paste it into a text editor nothing is pasted. So it
seems like the copy command in my code is failing. I have to
click the button 1 or 2 times then it works. Is there a way
to know if the copy command worked? The code below always
return a result of 1, even when the copy does not work.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext">
void* ptr = nullptr;<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext">
long result = table->handle(this, FXSEL(SEL_COMMAND,
FXTable::ID_COPY_SEL), ptr);<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext">
if (result == 0)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext">
{<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext">
FXMessageBox::warning(this, MBOX_OK, "Copy problem", "Could
not copy the table.");<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext">
}<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext;mso-ligatures:none">Kind
regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext;mso-ligatures:none"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext;mso-ligatures:none">js<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Aptos",serif;color:windowtext;mso-ligatures:none"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre wrap="" class="moz-quote-pre">_______________________________________________
Foxgui-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/foxgui-users">https://lists.sourceforge.net/lists/listinfo/foxgui-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Roland Hughes, President
Logikal Solutions
(630)-205-1593 (cell)
<a class="moz-txt-link-freetext" href="https://theminimumyouneedtoknow.com">https://theminimumyouneedtoknow.com</a>
<a class="moz-txt-link-freetext" href="https://infiniteexposure.net">https://infiniteexposure.net</a>
<a class="moz-txt-link-freetext" href="https://johnsmith-book.com">https://johnsmith-book.com</a></pre>
</body>
</html>
--------------DkeWp0Po0V9bn7d4m3lI2Waf
Content-Type: image/gif; name="image001.gif"
Content-Disposition: inline; filename="image001.gif"
Content-Id: <[email protected]>
Content-Transfer-Encoding: base64
R0lGODlhHwAfAIAAAODg4AAAACH5BAAAAAAALAAAAAAfAB8AAAIdhI+py+0Po5y02ouz3rz7
D4biSJbmiabqyrbuOxUAOw==
--------------DkeWp0Po0V9bn7d4m3lI2Waf--
--------------fmFvayIHc7YGdNwzjZj0LJMP--
--===============5965060612947673703==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============5965060612947673703==
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
--===============5965060612947673703==--