Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Documentation MSGBOX Ctrl-C

Aug
1,957
71
Starting with version 10 of TCC, the ability to copy the content of a MSGBOX to the clipboard using Ctrl-C was added.

It would be great if this information could be added to the help for MSGBOX
 
This is a native WinAPI ability existing for well over twenty years.
Yes. And TCC v10 was the first to take advantage of it. You do not get that behavior from a simple MessageBox() or MessageBoxEx(). And you don't get it from a MSGBOX in TCC before version 10. Does anyone know what it takes to get that behavior?
 
Ctrl-C works with the following;
Code:
echo %@winapi[user32.dll,MessageBox,0,Message,Title]
1530741229586.png

...then;
Code:
c:\users\jlc\utils>type clip:
---------------------------
Title
---------------------------
Message
---------------------------
OK
---------------------------

Joe
 
FWIW, Ctrl-C also works with TASKDIALOG;
1530741372203.png

Code:
c:\users\jlc\utils>type clip:
[Window Title]
Display A Second Line

[Main Instruction]
Example:

[Content]
To display a second line, append a
 to the /B argument, followed by the text for the second line.

[Button 1 ] [Button 2] [Button 3]

It would just be informative if the Ctrl-C ability was included in the help file for MSGBOX, TASKDIALOG, etc., instead of just being relegated to the "What's New" section of the help file.

Joe
 
I guess MessageBox and MessageBoxEx are OK (Ctrl-C copies), but MSGBOX doesn't use them. 4NTv8 (no copying) uses DialogBoxIndirectParamW and TCCv23 (copying OK) uses CreateDialogIndirectParamW.
 
Back
Top