Posted
Filed under C,C++

mrfc에서 제공 해주는 인터넷 익스플로어를 사용 하여
웹페이지를 네비게이트 했을 때
javascript의 window.close() ; 이벤트에 의해서 창이 닫이고 배경이 보이는 현상이 발생 한다.
그래서 OnWindowClosing  핸들러를 등록 하고 ..
다음과 같이
 *Cancel=TRUE; 처리 한다.

void CViewDlg::OnWindowClosingExplorer1(BOOL IsChildWindow, BOOL FAR* Cancel)
{
 // TODO: Add your control notification handler code here
 *Cancel=TRUE;
 char currentPath[_MAX_PATH];
    _getcwd(currentPath, _MAX_PATH);

 char path[200];
 sprintf(path,"%s\\main\\index.html",currentPath);
    printf("%s",path);
 m_browser.Navigate(path, NULL, NULL, NULL, NULL);

}

2010/02/24 18:47 2010/02/24 18:47