ATL环境:设置父窗口激活属性

设置窗口激活属性:窗口A->B->C,这里设置在C对话框显示时A和B都不能操作

LRESULT sindykTools::AttrPOIDlg::OnBatchCreateSubPointButton(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
  // Dialog B
 
  BatchCreatSubPointDlg batchCreatDlg;
  batchCreatDlg.initialize( poiRows );

  CWindow fatherWindow = GetTopLevelParent();
  fatherWindow.EnableWindow(FALSE); // Hide Dialog A

  batchCreatDlg.DoModal();// Dialog C

  fatherWindow.EnableWindow(TRUE);
  // ...
}
 

 

posted @ 2017-12-19 15:39  子非也  阅读(226)  评论(0编辑  收藏  举报