File: README

package info (click to toggle)
ace 6.0.3%2Bdfsg-0.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 49,368 kB
  • sloc: cpp: 341,826; perl: 30,850; ansic: 20,952; makefile: 10,144; sh: 4,744; python: 828; exp: 787; yacc: 511; xml: 330; lex: 158; lisp: 116; csh: 48; tcl: 5
file content (40 lines) | stat: -rw-r--r-- 1,530 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
                     MFC Logging Example documentation
                     =================================
                            by Craig Rodrigues <crodrigu@bbn.com>
		               2002/08/02

The example in this directory is a Microsoft Foundation Class (MFC)
example which illustrates how to write an ACE_Log_Msg_Callback which
can send debug output to the Microsoft debugger console.

This is very useful when debugging an MFC GUI-based application which
uses ACE.

NOTES
=====
 - Make sure that $ACE_ROOT/ace/acemfcd.lib is built before building this
   example.  Follow the instructions in $ACE_ROOT/ACE-INSTALL.html for building
   ACE with Visual C++.  Do a Batch Build of ACE, and make sure that you build
   the target "ACE DLL - Win32 MFC Debug".

 - We must call ACE::init() and ACE::fini() in the right places
   otherwise we will get strange crashes and memory leaks
   when invoking ACE_Log_Msg::instance().
   A good place to invoke these methods is in the method which overrides
   CWinApp::InitInstance().
   In this example, we invoke these methods in CLog_Msg_MFCApp::InitInstance().

 - We must set the ACE_Log_Msg singleton to use our callback with:
    ACE_Log_Msg::instance()->msg_callback( &m_mfc_logger );
    ACE_Log_Msg::instance()->set_flags( ACE_Log_Msg::MSG_CALLBACK );

   This is also done in CLog_Msg_MFCApp::InitInstance().


THANKS
======
Thanks to the following people who provided assistance on the ACE
mailing list:
Chris Hafey <chafey@stentor.com>
Don Hinton <dhinton@ieee.org>