Code Yarns β€πŸ‘¨β€πŸ’»
Tech Blog ❖ Personal Blog

How to copy text in a dialog box in Windows

πŸ“… 2013-Jun-05 ⬩ ✍️ Ashwin Nanjappa ⬩ πŸ“š Archive

Problem

[caption id="attachment_3536" align="aligncenter" width="475"][DirectX error](http://codeyarns.files.wordpress.com/2013/06/20130605-directx-error.png) DirectX error[/caption]

Windows programs can sometimes throw a dialog box or a message box with an error message or something similar in it. It might be necessary to copy the text displayed in the dialog. For example, you may want to search for the error text to find a solution.

Solution

The solution seems to be surprisingly simple. First, click anywhere in the dialog box, so that it gets focus. Next, press Ctrl+C Β to copy and paste it into any text editor by pressing Ctrl+V. All the text in the dialog box is copied over, including the title of the window and the text on the buttons.

For example, the error dialog box shown above generates this text when copied:

---------------------------
Renderer Error.
---------------------------
Unable to load d3dx9_43.dll. Please install the latest DirectX End User Runtime available at www.microsoft.com/directx.
---------------------------
OK
---------------------------

Tried with: Windows 7 x64