I have a function inside a class called "GetCaption" that lets the user retrieve current text assigned to a button. The caption is stored in a varible in the class as:
Then the "GetCaption" function is like this:PHP Code:char *caption;
Now I want to use this function like this but it's giving me an eror message "Unhandled exception in...":PHP Code:char CGButton::GetCaption()
{
if (CGButton::Handle == NULL)
{
return NULL;
}
else
{
return (char)CGButton::caption;
}
}
PHP Code:MessageBox(NULL,(char*)mybutton.GetCaption(),"hello",MB_OK);
