Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!mips!prls!pyramid!unify!antares!bob From: bob@antares.UUCP (Bob Paauwe) Newsgroups: comp.windows.ms Subject: Re: Getting simple debug output Summary: MessageBox function Message-ID: <437@antares.UUCP> Date: 6 Aug 90 23:27:54 GMT References: <1990Aug3.184951.5599@cs.umn.edu> Organization: Intel Corp., Folsom, CA Lines: 32 In article <1990Aug3.184951.5599@cs.umn.edu>, wytten@cs.umn.edu (Dale Wyttenbach) writes: > Right now I'm just opening a file called debug.txt and writing > stuff into that, but I'd like to have a quickie function that > pops up a dialog box with a message, sort of like this: > > sprintf(buf,"a= %d, b=%d",a,b); > debugwin(buf); > > Thanks, > > Dale Wyttenbach > wytten@cs.umn.edu Look at the MessageBox function. I think it will do exactly what you want. My old SDK documentation says this: "This function creates and displays a window that contains an application supplied message and caption, plus any combination of the predefined icons and push buttons described in the following list." You can use this to display a window with a one line message and and OK button. Basicly replace your 'debugwin(buf);' with - MessageBox ( hWndParent, (LPSTR)buf, (LPSTR)"DEBUG", MB_OK ); -- Bob Paauwe ________________________ Any resemblence to a bpaauwe@antares.intel.com | REAL opinion is unintentional. /-----------------___________________/---\___________________-----------------\ !ames!pacbell!sactoh0!mcdre3!bpaauwe \___/ I'd rather be Gliding!!!!!