Mail Archives: djgpp/1996/12/04/03:33:17
I also have a problem with the callback functions. I want to make a
checkbox which is checked, but cannot be unchecked. (without being disabled).
I made a callback function to undo an uncheck action.
void undo_uncheck(PCheckBox pcb, char *arg)
{
pcb->m.check();
}
MyCheckBox.m_set_unchecked_callback(undo_uncheck, "");
Now the compiler generates an error or warning because I should use
PObject instead of PCheckBox. But if I do that, I cannot use CheckBox
methods in my callback function. How should I do this ?
Is it allowed to put a 0 instead of the "" ?
What happens with the string argument ? You do not declare it as
const, so I cannot use a const char * for this ? Why not ?
Maybe there is a better way to achieve what I want. All comments are
welcome.
----
Koen Van Herck
Electronic Design Engineer
E-mail: Koen DOT VanHerck AT barco DOT com
BBBB AAA RRRR CCC OOO B A R C O V I S U A L S Y S T E M S
B B A A R R C O O A division of Barco Projection Systems
B BB A AAA R RR C OO O OO
B B A A R R C O O Noordlaan 5 Tel +32 (0)56 36 85 71
BBBB A A R R CCC OOO B-8520 Kuurne Fax +32 (0)56 36 83 55
- Raw text -