<p>How do you change controls' Z-order in MFC <strong>at design time</strong> - i.e. I can't use SetWindowPos or do this at runtime - I want to see the changed z-order in the designer (even if I have to resort to direct-editing the .rc code).</p>

<p>I have an MFC dialog to which I am adding controls.  If there is overlap between the edges of the controls, I want to bring one to the front of the other.  In Windows Forms or WPF, etc. I can Bring to Front, Send to Back, Bring Forward, Send Back.  I don't find these options in MFC, nor can I tell how it determines what is in front, as a control just added is often behind a control that was there previously.  How can I manipulate the Z-order in MFC?  Even if I have to manipulate the .rc file code directly (i.e. end-run around the designer).</p>

```
```
GetDlgItem(IDC_MYCONTROL)->SetWindowPos(HWND_TOP,
                                        0, 0, 0, 0,
                                        SWP_NOMOVE | SWP_NOSIZE);
```
```