March 28, 2024, 03:51:13 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


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.

Haim

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?

Haim

sapero

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

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

Haim


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

Haim