Free Source Code and Program Tips
MessageBox support Ctrl+C to copy content
It’s a good trick. From windows 2000, when a MessageBox popped out, you can use Ctrl+C to copy the content of the MessageBox window to the clipboard. It is a very interesting trick, and it is very usrful to share the information easily.
The condition is only that the MessageBox window was created by MessageBoxA/MessageBoxW from the win32 api. Whether you call AfxMessageBox or CWnd::MessageBox in vc or MsgBox in vb, they finally call the ::MessageBoxA or ::MessageBoxW, so it also works.
Here is a example.
1. When some message box popped, press Ctrl+C to copy.
2. Paste in notepad, and you will see…
—————————
Notepad
—————————
The text in the Untitled file has changed.
Do you want to save the changes?
—————————
Yes No Cancel
—————————
| Print article | This entry was posted by hamo on January 1, 2007 at 12:26 am, and is filed under General. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
No comments yet.
No trackbacks yet.
Android View Add Listener Tips Sample
about 7 months ago - No comments
In the development for the control to add Listener is a very common work, the easiest way to add Listener can be: 1 findViewById (R.id.myButton). setOnClickListener (new View.OnClickListener () (public void onClick (View v) (/ / Do stuff))); Add a Listener using the above method has a drawback is that if control is too large,
Add a Listener Tips Android View Sample
about 9 months ago - No comments
In the development for the control to add Listener is a very common work, the easiest way to add Listener can be: 1 findViewById (R.id.myButton). setOnClickListener (new View.OnClickListener () (public void onClick (View v) (/ / Do stuff))); Add a Listener using the above method has a drawback is that if control is too large,
30 Great Tips of CListCtrl Program(2)
about 2 years ago - No comments
30 Great Tips of CListCtrl Program(1) 8. Get Item Infomation TCHAR szBuf[1024];LVITEM lvi;lvi.iItem = nItemIndex;lvi.iSubItem = 0;lvi.mask = LVIF_TEXT;lvi.pszText = szBuf;lvi.cchTextMax = 1024;m_list.GetItem(&lvi); More infomation: Q173242: Use Masks to Set/Get Item States in CListCtrl 9. Get the header titile of CListCtrl LVCOLUMN lvcol;char str[256];int nColNum;CString strColumnName[MAX_COL];nColNum = 0;lvcol.mask = LVCF_TEXT;lvcol.pszText = str;lvcol.cchTextMax = 256;while(m_list.GetColumn(nColNum, &lvcol)){
30 Great Tips of CListCtrl Program(1)
about 2 years ago - 1 comment
Without a special note,the listctrl has the default view style of report. 1. CListCtrl style LVS_ICON: for each item displayed great icon LVS_SMALLICON: for each item displayed on the icon LVS_LIST: a show with a small icon on the item LVS_REPORT: Show item details You can inspect the Windows Explorer,
The Simplest way to change the row height of CListCtrl
about 2 years ago - No comments
In the post “How to change the row height of CListCtrl“, it gives 2 solution example how to change row height or CListCtrl. Hower, it is not the simplest way. The simplest way to change the row height in a CListCtrl is: Display an icon with the desired height. All other ways that I know
Solution of fatal error RC1004: unexpected end of file found
about 2 years ago - 11 comments
After you modified your reource.h, you may got this error: fatal error RC1004: unexpected end of file found. It’s a bug of the resource compiler. The solution is adding a blank line or two to the end of the file and build again.
How to launch an Application with Admin privileges in VISTA
about 3 years ago - No comments
When you develop some admin utility, which will need the administrator privilege to configures some H/W connected ove LAN, etc. And you will found that the application is running propertyly in XP just by a double click of the mouse, where as in VISTA if you run it as Administrator then only running. So, how
How to Get the Primary Domain name
about 3 years ago - No comments
In gina, the system will list the domain name of the current system. How to get the primary domain name in your program? From the released the Windows2000 and NT source code, you can get the code of gina. It locate on \win2k\private\windows\gina\winlogon\usrpro.c. Here is the code: DWORD rc; PWSTR PrimaryDomain; rc = NetGetJoinInformation (
How to enable “profile” in Visual C++ 6.0
about 3 years ago - 1 comment
From MSDN: The profiler is an analysis tool that you can use to examine the run-time behavior of your programs. By using profiler information, you can determine which sections of your code are working efficiently. The profiler can produce information showing areas of code that are not being executed or that are taking a long
Setup SCIM in Ubuntu 6.10
about 3 years ago - No comments
After install the ubuntu 6.10 from the live-cd, you may find that the SCIM does not work. All the related package has been installed, but after press Ctrl+Space, the SCIM input has not enabled. The main reason is that the scim daemo is not running. Following is the solution: create 75scim file under /etc/X11/Xsession.d/ with