I am learning windows programming and I have programmed in vb for some months.

In vb, if you want to refer to set the property of an object, you just use a dot between the object and the property like this:

object.name = "blahblahblah"

How can I refer to the properties in C++. Let us say I have a button and I want to set its text to "thisistext" I think that I can use this thing

button.text = "thisistext"

I know that you can change the text with the API like this:

SetWindowText(thehwndofbutton, "thisistext");

Do you always use API to set the property of an object?

2)

How do change the fore and back color of a button. I used this to change the backcolor but it does not work:

SetBkColor(hdcofbutton, (HBRUSH)1);

?????