Pointer to EditStreamCallback function 
Author Message
 Pointer to EditStreamCallback function

Hi all,

I need to insert  text from an input stream into CRichEditCtrl object. I
have problem to set EDITSTREAM structure :

typedef struct _editstream

    DWORD dwCookie;
    DWORD dwError;


I make  EditStreamCallback function in my CEditDoc class

 DWORD CALLBACK CEditDoc::EditStreamCallback(DWORD dwCookie, LPBYTE pbBuff,
LONG cb, LONG *pcb);

But I can't set a pointer to this function :

 m_es.pfnCallback = EditStreamCallback;

there is this error :

error C2440: '=' : cannot convert from 'unsigned long (__stdcall
CEditDoc::*)(unsigned long,unsigned char *,long,long *)' to 'unsigned long
(__stdcall *)(unsigned long,unsigned char *,long,long *)'

How shell I do it (Do you have any example) ?


Fri, 24 Oct 2003 14:35:56 GMT  
 [ 1 post ] 

 Relevant Pages 

1. How to use (pointer to function), and function and pointer to (pointer to function)

2. Pointer Functions and Pointers to Pointer Functions

3. Question about signal()/pointers to functions that return pointers to functions

4. function pointers and function pointers array

5. C++ function pointers versus C function pointer problem

6. Pointer to function returning pointer to function returning...

7. EditStreamCallback question

8. RichEdit, EditStreamCallback and UNICODE

9. Pointers to Structure that contains pointer to Function

10. Casting function pointer to void pointer

11. Pointer to an array of pointers to functions

12. Assigning structure pointer to function pointer


Powered by phpBB® Forum Software