A property is a way of making a member field that looks like a regular variable but which actually uses functions to get and set the value. C++ doesn't have properties in the language, but it is not uncommon to write a little class which does the job.
The __property class overloads all the operators necessary to make it look like an AnsiString, but it is still a different class, so you cannot pass it directly to the function. Since you don't know anything about the string besides what the accessor function gives you, you must use a temporary. This is the achilles heel of properties.
I know the thread is old, but I can't help writing a little additional note, since I just encountered a similar problem wanting to swap Captions. After reading Duoas's answer about properties, I was not happy with the mess this temporary would give in my code (isn't one major reason for creating functions in the first place the wish to avoid mess? ;)
So instead, I settled for a different solution: passing the control by reference and using a temporary inside the function (for swapping). And the above function would not even need a temporary:
(Since Button1 is already a pointer, the code looks nicer as well.)
Unfortunately, it seems not possible to generalise this function to modify the Caption property of any TObject*, since Caption was not accessible to the function. (Hence, the name BtnCaptionChange and not just CaptionChange)