What I do with function callback is...
Code:
#define REGISTERFUNCTION(name) FunctionList_AddFunction( name, #name)
VOID FunctionList_AddFunction( void (*func)(pClickbutton button), char *name )
{
// in here add the function pointer and the name pair to a list
// you can search through the list when parsing the text files to find the correct function pointer
}
Then before you start parsing text files you need to do...
Code:
REGISTERFUNCTION( MainMenu_Quit );
for each function you want your text files to be able to call.
You can probably do something a bit similar to windows where you have 1 callback for each window. Pass it the pointer to the window structure, a message, and the WPARAM, LPARAM for data and just let the messaged define how to cast them.
Scott