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 CGButton::GetCaption()
{
if (CGButton::Handle == NULL)
{
return NULL;
}
else
{
return (char)CGButton::caption;
}
}
Now I want to use this function like this but it's giving me an eror message "Unhandled exception in...":
PHP Code:
MessageBox(NULL,(char*)mybutton.GetCaption(),"hello",MB_OK);