copy_fmt callback is not called in VC 6.0 
Author Message
 copy_fmt callback is not called in VC 6.0

The registered callback functions are not getting called
when copyfmt_event occurs

I used the following code
void main( )
{
   cout.register_callback( callback1, 0 );
   cin.register_callback( callback2, 0 );

   cout.copyfmt(cin);

Quote:
}

void callback1( ios_base::event e, ios_base& stream, int
arg )
{
   switch ( e )
   {
      case ios_base::erase_event:
         cout << "an erase event" << endl;
         break;
      case ios_base::copyfmt_event:
         cout << "an copyfmt event" << endl;
         break;
   };

Quote:
}

void callback2( ios_base::event e, ios_base& stream, int
arg )
{
   switch ( e )
   {
      case ios_base::erase_event:
         cout << "an erase event" << endl;
         break;
      case ios_base::copyfmt_event:
         cout << "an copyfmt event" << endl;
         break;
   };

Quote:
}

Please tell me as to where I am going wrong..

Thanks in advance



Tue, 13 Dec 2005 22:17:19 GMT  
 copy_fmt callback is not called in VC 6.0

Quote:


> Subject: copy_fmt  callback is not called in VC 6.0
> Date: Fri, 27 Jun 2003 07:17:19 -0700

> The registered callback functions are not getting called
> when copyfmt_event occurs

> I used the following code
> void main( )
> {
>    cout.register_callback( callback1, 0 );
>    cin.register_callback( callback2, 0 );

>    cout.copyfmt(cin);
> }

> void callback1( ios_base::event e, ios_base& stream, int
> arg )
> {
>    switch ( e )
>    {
>       case ios_base::erase_event:
>          cout << "an erase event" << endl;
>          break;
>       case ios_base::copyfmt_event:
>          cout << "an copyfmt event" << endl;
>          break;
>    };
> }

> void callback2( ios_base::event e, ios_base& stream, int
> arg )
> {
>    switch ( e )
>    {
>       case ios_base::erase_event:
>          cout << "an erase event" << endl;
>          break;
>       case ios_base::copyfmt_event:
>          cout << "an copyfmt event" << endl;
>          break;
>    };
> }

> Please tell me as to where I am going wrong..

> Thanks in advance

You're not doing anything wrong.  It looks like this is broken in VC6.  I
don't have  work-around to offer you, but I just confirmed that it is fixed
in VC7.

--
Eric Niebler, Microsoft Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm



Sun, 18 Dec 2005 02:50:40 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. a bug in VC 7.0 (but not in VC 6.0)

2. DLL built with VC 6.0 not working with VC 7.0 application

3. Works in VC 5.0 not in VC 6.0

4. VB callback function, called from a VC DLL, crashes

5. callback is not called

6. Timer callback not called back

7. Upgraded From VC 5.0 to 6.0 - MDI App Calling USER DLL - ASSERT in Debug

8. VC 6.0 - not Printing

9. New Msdn Help is not accessed by VC 6.0

10. VC 6.0 and Access 2000 not compatible!

11. vc 6.0 could not work in win ME

12. VC 6.0 and Access 2000 not compatible!

 

 
Powered by phpBB® Forum Software