GetActiveWindow
-
Im having a UI with dialogs embedded within other parent dialogs say sub dialogs as tabs of a main dlg I need to do some validation when a current tab is active only so I used
CWnd* pWnd = GetActiveWindow(); if(pWnd == this) { //...do something }
however the GetActiveWindow returns the parent window handle and not the sub Windows handle as pointed by this how do Isolve this?? -
Im having a UI with dialogs embedded within other parent dialogs say sub dialogs as tabs of a main dlg I need to do some validation when a current tab is active only so I used
CWnd* pWnd = GetActiveWindow(); if(pWnd == this) { //...do something }
however the GetActiveWindow returns the parent window handle and not the sub Windows handle as pointed by this how do Isolve this??Are you using a CTabCtrl or a CPropertySheet? Use either CTabCtrl::GetCurSel() or CPropertySheet::GetActivePage()
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"