Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!emory!hubcap!lsalomo From: lsalomo@hubcap.clemson.edu (lsalomo) Newsgroups: comp.os.os2.programmer Subject: Re: printf() will work in PM programs Message-ID: <11471@hubcap.clemson.edu> Date: 8 Nov 90 15:55:24 GMT References: <21079@ttidca.TTI.COM> Organization: Clemson University, Clemson, SC Lines: 28 Another good way to trace your program is to write some code containing the following procedures: TrcStart(HWND hwnd); TrcStop(HWND hwnd); TrcWrite(HWND hwnd,PCHAR fmt,...); TrcStart checks a list of active trace windows, and creates a NEW window containing a listbox if the window handle does not already have a trace window associated with it. TrcStop checks the list of active trace windows, and WinDestroyWindow()s the trace window associated with the specified window handle. TrcWrite uses vsprintf() to format the string and sends a LM_INSERTITEM to the trace window's listbox to write the string out. If you create your listbox with LS_HORZSCROLL, then you have a full-fledged tracer that can be used with any PM program. Cheers, Q - the "Q"uestor for knowledge (, a degree, etc.) lsalomo@hubcap.clemson.edu ibmman@clemson.clemson.edu ============================================================================= "Gee Wally, I think there's something wrong with the Beaver." =============================================================================