custom button w/o component or publishing?

2005-01-25 04:05:57 AM
Newbie wants to know if there is a way to use a button wrapper without going
to the trouble to make a component and/or publish. I dont need the custom
button to be on the ide, just want to be able to use it in the single form
or project I am working on. I looked at this example (yes, I could just use
SendWindowLong or use a bit button instead)...
The above shows a button wrapper to allow multiline text. I put that class
in my form, where I created a button named "Button1"
TWrapButton *twb = (TWrapButton *)Button1.
twb->Caption = "wrap\n this";
all I got was a vertical | eg: wrap|this
I also tried something that compilied, but did nothing...
TWrapButton *twb = (TWrapButton *)&TWrapButton(Button1);
twb->Caption = "wrap\n this";
all I got was the original "Button1" caption.