April 27, 2024, 11:28:20 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


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