Date: Wed, 4 Dec 1996 09:27:11 GMT From: kvhk AT ivs4 DOT barco DOT com (Koen Van Herck) Message-Id: <9612040927.AA24095@ivs4.> To: djgpp AT delorie DOT com Subject: JPTUI callback function Reply-To: Koen DOT VanHerck AT barco DOT com 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