July 13, 2024, 06:53:37 PM


IWBasic runs in Windows 11!

Simple, probably stupid question

Started by Haim, July 20, 2007, 08:47:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I have an untyped pointer which I want to typecast as a pointer to a groupbox control.

Can anyone show me how this should be done?



Just cast it: *(type)variable.method
pointer control = GetControl(IDB_STOP);
*(CStatic)control.SetText("stop"); // groupbox is a static control

Bruce Peaslee

It's not a stupid question. I was looking at this problem and was stuck because I did not realize that groupbox is a static control. Now we all learn something.  :D
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles


I had no idea it was a static control.
Thanks for your help!