locked
[MFC] Wrong z-order RRS feed

  • Question

  • I use MFC classes CPropertySheet and CPropertyPage to implement tabbed application.

    In one of my tabs I use a custom group box (http://www.codeproject.com/KB/miscctrl/xpgroupbox.aspx) and I have a few edit boxes, buttons and one CListCtrl (list control). If I click on or tab to the list control so that it is set active, and then click on another tab page and then back again, the list control is not drawn on top of my group box.
    It seems as if the z-order is changed somehow.

    Can anyone tell me what could be wrong? I have tried calling "Invalidate()" in the "OnSetActive" event with no luck. If I place a button in the dialog which calls "Invalidate()" the window is redrawn as it should.

    Please help, I am out of ideas.
    Friday, March 28, 2008 12:05 PM

All replies

  • In MFC, Z order is implicitly controlled by tab order of the controls. Try changing that. The controls that are more important tend to come on top .... (higher tab order)


    Saturday, March 16, 2013 10:23 AM