=================================================================== RCS file: /home/cvs/OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -u -p -r1.29 -r1.30 --- OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp 2013/08/30 18:18:11 1.29 +++ OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp 2013/12/09 00:51:20 1.30 @@ -736,20 +736,22 @@ BOOL CAsir32guiView::Create(LPCTSTR lpszClassName, LPC char *temp; char rootdir[BUFSIZ], errmsg[BUFSIZ], hndname[_MAX_PATH]; - if (get_rootdir(rootdir, BUFSIZ, errmsg)) { - sprintf(hndname, "%s\\bin\\asirgui.hnd", rootdir); - fp = fopen(hndname,"w"); - if ( fp ) { - fprintf(fp,"%d",(unsigned int)theView->m_hWnd); - fclose(fp); + if ( asirgui_kind == ASIRGUI_MAIN ) { + if (get_rootdir(rootdir, BUFSIZ, errmsg)) { + sprintf(hndname, "%s\\bin\\asirgui.hnd", rootdir); + fp = fopen(hndname,"w"); + if ( fp ) { + fprintf(fp,"%d",(unsigned int)theView->m_hWnd); + fclose(fp); + } } - } - if ( temp = getenv("TEMP") ) { - sprintf(hndname,"%s\\asirgui.hnd", temp); - fp = fopen(hndname,"w"); - if ( fp ) { - fprintf(fp,"%d",(unsigned int)theView->m_hWnd); - fclose(fp); + if ( temp = getenv("TEMP") ) { + sprintf(hndname,"%s\\asirgui.hnd", temp); + fp = fopen(hndname,"w"); + if ( fp ) { + fprintf(fp,"%d",(unsigned int)theView->m_hWnd); + fclose(fp); + } } } return ret;