Hello Nicolas,
There are two things to keep in mind:
1. If your panel has the "Use Windows Visual Styles for Controls" option turned on (to see if you do, click on "Other Attributes" from the Edit Panel dialog box), then you cannot change the color of command buttons in this panel, since that would conflict with the purpose of this option. If you're in this situation, and you don't want to turn off the option for the entire panel, you can turn it off only for this one command button, by making the following call:
SetCtrlAttribute (panelHandle, PANEL_COMMANDBUTTON, ATTR_DISABLE_PANEL_THEME, 1);
2. After you change the value of an attribute, you have to allow CVI to process system events in order to see the change. This is normally automatic, if you make the change inside some callback function that doesn't execute for very long. In that case, as soon as your code leaves the callback, and returns to the RunUserInterface loop, events will be processed, and you will see your change. However, if you are running a lot of code after the attribute change, you might have to wait a long time before you see your change. If this is your situation, you might have to add a ProcessDrawEvents call in order to see your change earlier.
Luis