• Keine Ergebnisse gefunden

Choosing messages to trace

Im Dokument or an (Seite 140-146)

Using the Message Trace view

Message Trace displays messages received by selected window classes or windows. Messages received via SendMessage are shown twice, once when they are sent and again when they return to show the return value.

Dispatched messages are shown once only, since their return value is meaningless. The message display is indented to show how messages are nested within other messages.

By default, WinSight traces all messages and displays them in the Message Trace view. WinSight gives you several ways to narrow down the tracing of messages:

Other tracing options

128

• Choose Messages I Selected Classes or Messages I Selected Windows, then select the classes (in the Class List view) or windows (in the Window Tree view) by using the mouse and Shift or Gtr!.

• Choose Message I All Windows.

• Choose Message I Options, then select any or all of fourteen groups of messages (the groups are described in Tables 7.1 through 7.14). Check All Messages in the Options dialog box to return to tracing all messages.

The Message Trace Options dialog box lets you change the format of the messages in Message Trace. It also lets you trace messages to a file, printer, or an auxiliary monitor or window.

• Normally, the Message Trace view interprets each message's parameters and displays them in a readable format (Interpret Values is checked).

Check Hex Values to view message parameters as hex values of wParam and IParam.

• Information on traced messages usually displays in the Message Trace view. However, you can send messages to a file, printer, or auxiliary monitor by checking Log File in the Message Trace Options dialog box and doing one of the following:

• Type a file name to trace to a log file. If the file already exists, messages are appended to the file.

• Type the name of the device (for example, type PRN) for the log file to send output to the printer port.

• Type AUX to output trace messages to an auxiliary monitor or window. To do this, you must have WINOX.SYS or OX.SYS installed as a device in your CONFIG.SYS file.

To stop logging message traces to a file, printer, or auxiliary monitor, uncheck Log File.

u

Format Handle ["Title" or {Class} 1 Message Status

Handle is the window handle receiving the message.

Title is the window's title. If the title is the null string, the class name is displayed instead, in curly braces.

Message is the message name as defined by Windows. They are displayed in WinSight in all uppercase letters. Known undocumented Windows

messages are shown in lowercase. Unknown message numbers (user-defined) are shown as wm_User+OxXXXX if they are greater-than or equal to wm_User or as wm_OxXXXX if they are less than wm_User. Registered message numbers (from RegisterWindowsMessage) are shown with their registered name in single quotes.

Borland C++ Users Guide

Status is one or more of the following:

• Dispatched indicates the message was received via DispatchMessage.

• Sent [from XXXXl indicates the message was received via SendMessage. If it was sent from another window, from XXXX gives that window's handle.

If it was sent from the same window receiving it, this is shown with from self. If it was sent from Windows itself, the "from" phrase is omitted.

• Returns indicates the message was received via SendMessage and is now returning.

• Additional messages might include a numeric return value or text message such as wm_GetText. For sent and dispatched messages, WinSight interprets the parameters and gives a readable display. For messages that have associated data structures (wm_Create, for example) it takes those structures and includes them in the display.

Table 7.1: Mouse messages WM_HSCROLL

Table 7.2: Window messages WM_ACTIVATE Table 7.3: Input messages WM_CHAR

Table 7.4: System messages

WM_COMPACTING WM_PALETTECHANGED WM_SYSCOLORCHANGE

WM_DEVMODECHANGE WM_PALETTEISCHANGING WM_SYSCOMMAND

WM_ENTERIDLE WM_POWER WM_ TIMECHANGE

WM_FONTCHANGE WM_QUEUESYNCH WM_WININICHANGE

WM_NULL WM_SPOOLERSTATUS

Table 7.5: Initialization messages

WMJNITDIALOG WMJNITMENU WMJNITMENUPOPUP

Table 7.6: Clipboard messages·

WM_ASKCBFORMATNAME WM_DESTROYCLIPBOARD WM_RENDERALLFORMATS

WM_CHANGECBCHAIN WM_DRAWCLIPBOARD WM_RENDERFORMAT

WM_CLEAR WM_HSCROLLCLIPBOARD WM_SIZECLIPBOARD

WM_COPY WM_PAINTCLIPBOARD WM_UNDO

WM_CUT WM_PASTE WM_ VSCROLLCLIPBOARD

Table 7.7: DDE messages

WM_DDE_ACK WM_DDE_EXECUTE WM_DDE_REQUEST

WM_DDE_ADVISE WM_DDEJNITIATE WM_DDE_TERMINATE

WM_DDE_DATA WM_DDE_POKE WM_DDE~UNADVISE

Table 7.8: Nonclient messages

WM_NCACTIVATE WM_NCLBUTTONDOWN WM_NCPAINT

WM_NCCALCSIZE WM_NCLBUTTONUP WM_NCRBUTTONDBLCLK

WM_NCCREATE WM_NCMBUTTONDBLCLK WM_NCRBUTTONDOWN

WM_NCDESTROY WM_NCMBUTTONDOWN WM_NCRBUTTONUP

WM_NCHITTEST WM_NCMBUTTONUP

WM_NCLBUTTONDBLCLK WM ... NCMOUSEMOVE

Table 7.9: Print messages

DM_COLOR DM_MODIFY DM_PRINTQUALITY

DM_COPIES DM_ORIENTATION DM_PROMPT

DM_COPY DM_OUT _BUFFER DM_SCALE

DM_DEFAUL TSOURCE DM_OUT _DEFAULT DM_SPECVERSION

DM_DUPLEX DM_PAPERLENGTH DM_ TTOPTION

DMJN_BUFFER DM_PAPERSIZE DM_UPDATE

DMJN_PROMPT DM_PAPERWIDTH DM_ YRESOLUTION

130 Borland C++ Users Guide

Table 7.10: Control messages

Table 7.11: Pen messages

WIN_USER WM_HOOKRCRESUL T WM_RCRESUL T

WM_GLOBALRCCHANGE WM_PENWINFIRST WM_SKB

WM_HEDITCTL WM_PENWINLAST

Table 7.12: Multimedia messages

MM_ADLIB MM_MIM_CLOSE MM_SNDBLST _MIDIIN

MM_JOY1 BUTTON DOWN MM_MIM_DATA MM_SNDBLST _MIDIOUT

MM_JOY1 BUTTONUP MM_MIM_ERROR MM_SNDBLST _SYNTH

MM_JOY1 MOVE MM_MIM_LONGDATA MM_SNDBLST _WAVEIN

MM_JOY1 ZMOVE MM_MIM_LONGERROR MM_SNDBLST _WAVEOUT

MM_JOY2BUTTONDOWN MM_MIM_OPEN MM_WAVE_MAPPER

MM_JOY2BUTTONUP MM_MOM_CLOSE MM_WIM_CLOSE

MM_JOY2MOVE MM_MOM_DONE MM_WIM_DATA

MM_JOY2ZMOVE MM_MOM_OPEN MM_WIM_OPEN

MM_MCINOTIFY MM_MPU40CMIDIIN MM_WOM_CLOSE

MM_MICROSOFT MM_MPU40CMIDIOUT MM_WOM_DONE

MM_MIDI_MAPPER MM_PC_JOYSTICK MM_WOM_OPEN

Table 7.13: Other messages

WM_COALESCE_FIRST WM_MDIACTIVATE WM_MDIRESTORE

WM_ COALESCE_LAST WM_MDICASCADE WM_MDISETMENU

WM_COMMNOTIFY WM_MDICREATE . WM_MDITILE

WM_COMPAREITEM WM_MDIDESTROY WM_MEASUREITEM

WM_DELETEITEM WM_MDIGETACTIVE WM_NEXTDLGCTL

WM_DRAWITEM WM_MDIICONARRANGE WM_SYSTEMERROR

WM_DROPFILES WM_MDIMAXIMIZE

WM_KEYFIRST WM_MDINEXT

Table 7.14: Messages not documented by Microsoft

WM_AL TT ABACTIVE WM_ENTERSIZEMOVE WM_QUERYPARKICON

WM_BEGINDRAG WM_EXITMENULOOP WM_SETHOTKEY

WM_CONVERTREQUEST WM_EXITSIZEMOVE WM_SETVISIBLE

WM_CONVERTRESUL T WM_FILESYSCHANGE WM_SIZEWAIT

WM_DRAGLOOP WM_GETHOTKEY WM_SYNCPAINT

WM_DRAGMOVE WM-,SACTIVEICON WM_SYNCTASK

WM_DRAGSELECT WM_LBTRACKPOINT WM_SYSTIMER

WM_DROPOBJECT WM_NEXTMENU WM_TESTING

WM_ENTERMENULOOP WM_QUERYDROPOBJECT WM_ YOMICHAR

132 Borland C++ Users Guide

c

H A p T E R

8

WinSpector

WinSpector and its utilities help you perform a postmortem examination of Unrecoverable Application Errors (UAEs) and General Protection Faults (GPFs). When a UAE or GPF occurs, WinSpector writes a log file to your disk that shows you helpful information about the cause of the exception, including

• The call stack that was active when an exception occurred

• Function and procedure names ill the call stack

• CPU registers

• A disassembly of the machine instructions where the exception occurred

• Windows information about the program environment

Im Dokument or an (Seite 140-146)