>Hi!
>
>I'm using Metrowerks CW7 in Windows and C++ environment setting.
>
>"TblSetCustomDrawProcedure" function use to set customdraw table callback function
>but the callback function is class member function.
>
>CW7 Compiler illegal implicit conversion error message.
>

The problem is that a member function has an extra, implicit parameter, the object
whose member function is being called. "this".

>How can i do this ploblem?

Depends on how involved in C++ arcana you want to be. ;-)

Simple, non C++ solution:
        Use a global

TableObject *theTable;
void MyTableDrawItemFunc (void *tableP, Int16 row, Int16 column, RectangleType *bounds)
{ theTable->TableDrawItem ( tableP, column, bounds ); }

.... in your code somewhere ....

theTable = &<your table object>;
TblSetCustomDrawProcedure ( tableP, column, MyTableDrawItemFunc );


A better solution is to package the object pointer and the function into an object
that does this all automatically. This is called a 'functor' in C++ lingo.

Unfortunately, the table draw dispatcher doesn't know C++ from
anything, so it can't use operator () to get a function pointer.
-- 
-- Marshall

Marshall Clow     Idio Software   <mailto:[EMAIL PROTECTED]>
Hey! Who messed with my anti-paranoia shot?

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to