Having problems with the following...
// this is contained within "UF_styler.h" and can not be alternate
...
[B]typedef int (*UF_STYLER_cb_f_t)(int dialog_id,
void *client_data,
UF_STYLER_item_value_type_p_t call_data);[/B]
struct UF_STYLER_callback_info_s {
char *object_id;
int cb_type;
int is_dialog_launching_cb;
[B]UF_STYLER_cb_f_t callback_proc;[/B]
};
typedef struct UF_STYLER_callback_info_s UF_STYLER_callback_info_t,
*UF_STYLER_callback_info_p_t;
....
// my dialog.hxx file
#ifndef UIDIALOG_HXX_INCLUDED
#define UIDIALOG_HXX_INCLUDED
#include <UF_styler.h>
class UIEntryPoint
{
public:
UIEntryPoint(void);
virtual ~UIEntryPoint(void);
int Dialog(void);
private:
int ok_cb(int dialog_id, void *client_data,
UF_STYLER_item_value_type_p_t cb);
int cancel_cb(int dialog_id, void *client_data,
UF_STYLER_item_value_type_p_t cb);
};
#endif // UIDIALOG_HXX_INCLUDED
// my dialog.cpp file
#include ".\UIEntryPoint.hxx"
UIEntryPoint::UIEntryPoint(void) {}
UIEntryPoint::~UIEntryPoint(void) {}
int UIEntryPoint::Dialog(void)
{
const unsigned COUNT = 3;
UF_STYLER_callback_info_t CBS[COUNT] =
{
{"UF_STYLER_DIALOG_INDEX", UF_STYLER_OK_CB, 0, ok_cb},
{"UF_STYLER_DIALOG_INDEX", UF_STYLER_CANCEL_CB, 0, cancel_cb},
{"UF_STYLER_NULL_OBJECT" , UF_STYLER_NO_CB, 0, 0}
};
return (response);
}
int UIEntryPoint::ok_cb(int dialog_id, void *client_data,
UF_STYLER_item_value_type_p_t cb)
{
return (UF_UI_CB_EXIT_DIALOG);
}
int UIEntryPoint::cancel_cb(int dialog_id, void *client_data,
UF_STYLER_item_value_type_p_t cb)
{
return (UF_UI_CB_EXIT_DIALOG);
}
When I comply I get the following error...
error C2440: 'initializing' : cannot convert from 'overloaded-function' to 'UF_STYLER_cb_f_t'
Any help would be greatly appreciated!!!
I had this solved before about three years ago, but for the life of me, I can not find that code and forgot how I solved it.
Best Regards