log.cpp
上传用户:songshun
上传日期:2007-01-04
资源大小:51k
文件大小:2k
源码类别:

按钮控件

开发平台:

Visual C++

  1. //===========================================================================
  2. //
  3. // HomeWork from Belgium Not licensed software  
  4. // 1999 - 2000 No rights reserved
  5. //
  6. //===========================================================================
  7. //
  8. // Project/Product : Iconizer DLL
  9. //  FileName : log.cpp
  10. // Author(s) : Bart Gysens
  11. //
  12. // Description : Declaration of CLog class
  13. //
  14. // Classes : CLog
  15. //
  16. // Information :
  17. //   Compiler(s) : Visual C++ 6.0
  18. //   Target(s) : Windows 95/98 and Windows NT (x86)
  19. //   Editor : Visual C++ 6.0 internal editor
  20. //
  21. // History
  22. // Vers.  Date      Aut.  Type     Description
  23. //  -----  --------  ----  -------  -----------------------------------------
  24. // 1.00   22 05 99  BG    Create   Original
  25. //
  26. //===========================================================================
  27. #include "stdafx.h"
  28. #include "stdio.h"
  29. #include "log.h"
  30. //===========================================================================
  31. // Macros and typedefs
  32. //===========================================================================
  33. //===========================================================================
  34. // 
  35. // Class : CLog
  36. // Author(s) : Bart Gysens
  37. //
  38. // Description : Declaration of the CLog class
  39. //
  40. // Comments : none
  41. //
  42. // History : 1.00  : Create
  43. //
  44. //===========================================================================
  45. CLog::CLog()
  46. {
  47. }
  48. void CLog::PutLog( LPSTR pFmt, ... )
  49. {
  50. FILE * pFile;
  51. pFile = fopen( "C:\LOG.TXT", "a" );
  52. if ( pFile != NULL )
  53. {
  54. va_list arg;
  55. va_start( arg, pFmt );
  56. vfprintf( pFile, pFmt, arg );
  57. va_end( arg );
  58. fclose( pFile );
  59. }
  60. }