home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
windows
/
wdn.zip
/
DBUGSHOW.C
next >
Wrap
C/C++ Source or Header
|
1990-09-11
|
1KB
|
36 lines
/* --- DBUGSHOW.C - Fuction that calls the Dbug application with a string
to be displayed */
/* BY: Michel Bouillon
First version : Jan 20 88
Last revision : Jan 20 88, 11:12am
*/
#include <windows.h>
#include <string.h> /* MS-C definitions */
#include <stdio.h>
#define HDBUG_WINDOW 0xffff
/*::defn */
#define DBUG_SHOW 0x6fff
/*::end*/
/*::fnproto*/
void cdecl far DbugShow(HWND hWind,char *szFormat,...);
/*::end*/
void cdecl far DbugShow( hWind,szFormat, Args )
/* this function is to be called by any application (once linked) to
cause the Dbug application to display the desired string */
HWND hWind; /* window handle of the calling window */
char *szFormat; /* Format string as used in printf() */
char Args; /* Zero or more parameters, as in printf */
{
static char Buf[256]; /* Buffer to format string into */
sprintf( Buf, "(%4x) ",(int)hWind);
vsprintf( &Buf[strlen(Buf)], szFormat, &Args );
SendMessage(HDBUG_WINDOW,DBUG_SHOW,NULL,(LONG)(LPSTR)Buf);
if (hWind == 7)
MessageBox(NULL,(LPSTR)Buf,(LPSTR)"DbugShow3",MB_OK);
}