Patch level : 10.0
Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Aggiunto supporto per terminazione dei processi git-svn-id: svn://10.65.10.50/trunk@17706 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									fadfccbaee
								
							
						
					
					
						commit
						d03c1320dd
					
				@ -597,16 +597,16 @@ static BOOL CALLBACK EnumCampoChildrenProc(HWND hwnd, LPARAM lParam)
 | 
				
			|||||||
  return TRUE;
 | 
					  return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static BOOL CALLBACK EnumCampoWindowsProc(HWND hwnd, LPARAM lParam)
 | 
					static BOOL CALLBACK EnumCampoMenuChildrenProc(HWND hwnd, LPARAM lParam)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  char str[_MAX_PATH];
 | 
					  char str[_MAX_PATH];
 | 
				
			||||||
  if (::GetWindowText(hwnd, str, sizeof(str)))
 | 
					  if (::GetWindowText(hwnd, str, sizeof(str)))
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    const wxString title = str;
 | 
					    const wxString title = str;
 | 
				
			||||||
    if (title.StartsWith("Base - "))
 | 
					    if (title.StartsWith("Base - ")) // Scandisco solo i figli del menu
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      ::EnumChildWindows(hwnd, EnumCampoChildrenProc, lParam);
 | 
					      ::EnumChildWindows(hwnd, EnumCampoChildrenProc, lParam);
 | 
				
			||||||
      TFindWindowInfo* w = (TFindWindowInfo*)lParam;
 | 
					      const TFindWindowInfo* w = (TFindWindowInfo*)lParam;
 | 
				
			||||||
      if (w->_hwnd != NULL)
 | 
					      if (w->_hwnd != NULL)
 | 
				
			||||||
        return FALSE;
 | 
					        return FALSE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -614,12 +614,11 @@ static BOOL CALLBACK EnumCampoWindowsProc(HWND hwnd, LPARAM lParam)
 | 
				
			|||||||
  return TRUE;
 | 
					  return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
unsigned int OsWin32_FindMenuContainer()
 | 
					unsigned int OsWin32_FindMenuContainer()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  TFindWindowInfo w;
 | 
					  TFindWindowInfo w;
 | 
				
			||||||
  w._file = "__CAMPO_HOST_WINDOW__";
 | 
					  w._file = "__CAMPO_HOST_WINDOW__";
 | 
				
			||||||
  ::EnumWindows(EnumCampoWindowsProc, LPARAM(&w));
 | 
					  ::EnumWindows(EnumCampoMenuChildrenProc, LPARAM(&w));
 | 
				
			||||||
  return (unsigned int)w._hwnd;
 | 
					  return (unsigned int)w._hwnd;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -650,6 +649,30 @@ long OsWin32_CloseChildren(unsigned int parent)
 | 
				
			|||||||
  return n;
 | 
					  return n;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static BOOL CALLBACK CloseSiblingProc(HWND hwnd, LPARAM lParam)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  if (hwnd != (HWND)lParam)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    if (!::IsWindowVisible(hwnd))
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      char str[256];
 | 
				
			||||||
 | 
					      ::GetClassName(hwnd, str, sizeof(str));
 | 
				
			||||||
 | 
					      if (strcmp(str, "wxWindowClassNR") == 0)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        ::GetWindowText(hwnd, str, sizeof(str));
 | 
				
			||||||
 | 
					        if (str[0] == '\0')
 | 
				
			||||||
 | 
					          ::PostMessage(hwnd, WM_ENDSESSION, 0, 0);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  return TRUE;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void OsWin32_CloseSiblings(unsigned int parent)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  ::EnumWindows(CloseSiblingProc, parent);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
///////////////////////////////////////////////////////////
 | 
					///////////////////////////////////////////////////////////
 | 
				
			||||||
// Hardlock Support
 | 
					// Hardlock Support
 | 
				
			||||||
///////////////////////////////////////////////////////////
 | 
					///////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
				
			|||||||
@ -19,6 +19,7 @@ void OsWin32_PlaceProcessInWindow(unsigned int instance, const char* name, unsig
 | 
				
			|||||||
unsigned int OsWin32_FindMenuContainer();
 | 
					unsigned int OsWin32_FindMenuContainer();
 | 
				
			||||||
long OsWin32_GetChildrenCount(unsigned int parent);
 | 
					long OsWin32_GetChildrenCount(unsigned int parent);
 | 
				
			||||||
long OsWin32_CloseChildren(unsigned int parent);
 | 
					long OsWin32_CloseChildren(unsigned int parent);
 | 
				
			||||||
 | 
					void OsWin32_CloseSiblings(unsigned int parent);
 | 
				
			||||||
void OsWin32_UpdateWindow(unsigned int handle);
 | 
					void OsWin32_UpdateWindow(unsigned int handle);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void OsWin32_NumberFormat(char* str, int size);
 | 
					void OsWin32_NumberFormat(char* str, int size);
 | 
				
			||||||
 | 
				
			|||||||
@ -3662,6 +3662,16 @@ long xvt_sys_close_children(WINDOW win)
 | 
				
			|||||||
  return c;
 | 
					  return c;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					long xvt_sys_close_siblings(WINDOW win)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					 long c = 0; // Non sto a perder tempo a contarli :-)
 | 
				
			||||||
 | 
					#ifdef WIN32
 | 
				
			||||||
 | 
					  CAST_WIN(win, w);
 | 
				
			||||||
 | 
					  OsWin32_CloseSiblings((unsigned int)w.GetHandle());
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					  return c; 
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BOOLEAN xvt_sys_goto_url(const char* url, const char* action)
 | 
					BOOLEAN xvt_sys_goto_url(const char* url, const char* action)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
@ -3678,7 +3688,7 @@ BOOLEAN xvt_sys_dongle_server_is_running()
 | 
				
			|||||||
  BOOLEAN ok = sic.IsAnotherRunning();
 | 
					  BOOLEAN ok = sic.IsAnotherRunning();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WIN32
 | 
					#ifdef WIN32
 | 
				
			||||||
  if (!ok) // Testo anche Frontend!
 | 
					  if (!ok) // Testo anche il buon vecchio Frontend!
 | 
				
			||||||
    ok = ::GlobalFindAtom("DONGLE_SERVER_ATOM") != 0;
 | 
					    ok = ::GlobalFindAtom("DONGLE_SERVER_ATOM") != 0;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -365,6 +365,7 @@ XVTDLL void     xvt_sys_beep(int severity);
 | 
				
			|||||||
XVTDLL long     xvt_sys_execute(const char* cmdline, BOOLEAN sync, BOOLEAN iconizetask);
 | 
					XVTDLL long     xvt_sys_execute(const char* cmdline, BOOLEAN sync, BOOLEAN iconizetask);
 | 
				
			||||||
XVTDLL long     xvt_sys_execute_in_window(const char* cmdline, WINDOW win);
 | 
					XVTDLL long     xvt_sys_execute_in_window(const char* cmdline, WINDOW win);
 | 
				
			||||||
XVTDLL long     xvt_sys_close_children(WINDOW win);
 | 
					XVTDLL long     xvt_sys_close_children(WINDOW win);
 | 
				
			||||||
 | 
					XVTDLL long     xvt_sys_close_siblings(WINDOW win);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
XVTDLL BOOLEAN  xvt_sys_get_host_name(char* name, int maxlen);
 | 
					XVTDLL BOOLEAN  xvt_sys_get_host_name(char* name, int maxlen);
 | 
				
			||||||
XVTDLL BOOLEAN  xvt_sys_get_user_name(char* name, int maxlen);
 | 
					XVTDLL BOOLEAN  xvt_sys_get_user_name(char* name, int maxlen);
 | 
				
			||||||
 | 
				
			|||||||
@ -1002,6 +1002,7 @@ BEGIN_EVENT_TABLE(TTaskWin, wxFrame)
 | 
				
			|||||||
  EVT_MENU_RANGE(1000, 32766, TTaskWin::OnMenu)
 | 
					  EVT_MENU_RANGE(1000, 32766, TTaskWin::OnMenu)
 | 
				
			||||||
	EVT_PAINT(TTaskWin::OnPaint)
 | 
						EVT_PAINT(TTaskWin::OnPaint)
 | 
				
			||||||
	EVT_SIZE(TTaskWin::OnSize)
 | 
						EVT_SIZE(TTaskWin::OnSize)
 | 
				
			||||||
 | 
					  EVT_END_SESSION(TTaskWin::OnClose)
 | 
				
			||||||
END_EVENT_TABLE()
 | 
					END_EVENT_TABLE()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void TTaskWin::OnClose(wxCloseEvent& evt)
 | 
					void TTaskWin::OnClose(wxCloseEvent& evt)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user