Click to open or copy the TRACER project files.
TRACER is a Microsoft® Windows–hosted tool that lets you set the trace flags in Afx.ini. These trace flags determine what category of messages are sent from the debug version of an application to the debugging window or console. For an explanation of the trace options, see Technical Note 7: Debugging Trace Options. It is not necessary to build the Tracer.exe because it is already provided in \Microsoft Visual Studio\VC98\bin.
In addition to serving as a useful debugging tool, TRACER's sources show how to implement dialog data exchange, and a Windows-based application whose user interface is simply a dialog box.
The TRACER dialog box offers six trace options. The first option, Enable Tracing, turns tracing on or off. The other five options let you select which types of trace messages will be sent to the debugging window or console.
This sample demonstrates the following keywords:
AfxGetApp; AfxMessageBox; CDC::DrawIcon; CDC::GetSafeHdc; CDialog::DoModal; CDialog::OnInitDialog; CMenu::ModifyMenu; CRect::Height; CRect::Width; CString::LoadString; CWinApp::Enable3dControls; CWinApp::InitInstance; CWnd::DoDataExchange; CWnd::EnableWindow; CWnd::GetClientRect; CWnd::GetDlgItem; CWnd::GetSystemMenu; CWnd::IsIconic; CWnd::OnPaint; CWnd::OnSysCommand; CWnd::SendMessage; GetProfileInt; GetSystemMetrics; LOWORD; LoadIcon; PostQuitMessage