<p>Am I safe in casting a C++ bool to a Windows API BOOL via this construct</p>

<pre><code>bool mybool = true;
BOOL apiboolean = mybool ? TRUE : FALSE;
</code></pre>

<p>I'd assume this is a yes because I don't see any obvious problems but I wanted to take a moment to ask only because this may be more subtle than it appears. </p>

<p><em>Thanks to Dima for (gently) pointing out my carelessness in the way I'd originally phrased the question.</em> </p>

Do you mean
```
```
bool b;
...
BOOL apiboolean = b ? TRUE : FALSE;
```
```
If so, then yes, this will work.