W wujun Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-28 #1 我在DELPHI中用winexec运行一个VC编的可执行文件,我怎样才能<br>获得VC可执行文件的句柄,以及怎样控制他的最大化和怎样在程序<br>中关闭他?
K Keyes Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-28 #3 use findwindow to find the VC program handle,<br>findwindow('class or null','title or null')<br>sendmessage(handle,wm_close,0,0) to close it<br>sendmessage(handle,wm_minmax???,0,0) to ...<br>
use findwindow to find the VC program handle,<br>findwindow('class or null','title or null')<br>sendmessage(handle,wm_close,0,0) to close it<br>sendmessage(handle,wm_minmax???,0,0) to ...<br>
W wujun Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-28 #4 to keyes:<br> findwindow中我怎么才知道VC程序的title呢?
C cmxu Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-29 #8 用CreateProcess启动应用程序, 这样可以获得程序的ProcessID和ThreadID,<br>然后用EnumThreadWindow列举主线程的窗口, 如果列出的窗口没有父窗口, <br>就可以肯定是主窗口了.
用CreateProcess启动应用程序, 这样可以获得程序的ProcessID和ThreadID,<br>然后用EnumThreadWindow列举主线程的窗口, 如果列出的窗口没有父窗口, <br>就可以肯定是主窗口了.
W wujun Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-29 #9 to cytown:<br> 那spy++或winsight具体怎么使用呢?
C cAkk Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-29 #10 spy++好用一些,执行后,有一个find window选项,选择执行后,用鼠标将<br>那个十字图标拖到你要捕捉的窗口上,然后你就全明白了.
W wrench Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-29 #11 用CreateProcess执行<br>BOOL CreateProcess(<br><br> LPCTSTR lpApplicationName, // pointer to name of executable module <br> LPTSTR lpCommandLine, // pointer to command line string<br> LPSECURITY_ATTRIBUTES lpProcessAttributes, // pointer to process security attributes <br> LPSECURITY_ATTRIBUTES lpThreadAttributes, // pointer to thread security attributes <br> BOOL bInheritHandles, // handle inheritance flag <br> DWORD dwCreationFlags, // creation flags <br> LPVOID lpEnvironment, // pointer to new environment block <br> LPCTSTR lpCurrentDirectory, // pointer to current directory name <br> LPSTARTUPINFO lpStartupInfo, // pointer to STARTUPINFO <br> LPPROCESS_INFORMATION lpProcessInformation // pointer to PROCESS_INFORMATION <br> <br><br>lpProcessInformation->hProcess为该进程的句柄<br>具体可查delphi或VC的帮助
用CreateProcess执行<br>BOOL CreateProcess(<br><br> LPCTSTR lpApplicationName, // pointer to name of executable module <br> LPTSTR lpCommandLine, // pointer to command line string<br> LPSECURITY_ATTRIBUTES lpProcessAttributes, // pointer to process security attributes <br> LPSECURITY_ATTRIBUTES lpThreadAttributes, // pointer to thread security attributes <br> BOOL bInheritHandles, // handle inheritance flag <br> DWORD dwCreationFlags, // creation flags <br> LPVOID lpEnvironment, // pointer to new environment block <br> LPCTSTR lpCurrentDirectory, // pointer to current directory name <br> LPSTARTUPINFO lpStartupInfo, // pointer to STARTUPINFO <br> LPPROCESS_INFORMATION lpProcessInformation // pointer to PROCESS_INFORMATION <br> <br><br>lpProcessInformation->hProcess为该进程的句柄<br>具体可查delphi或VC的帮助
M midi Unregistered / Unconfirmed GUEST, unregistred user! 2000-01-05 #16 来晚了!!<br>如wrench所说,用CreateProcess()<br>createprocess(nil,'zq010.exe',nil,nil,false,0,nil,nil,info,pinfo)<br>句柄info.hprocess
来晚了!!<br>如wrench所说,用CreateProcess()<br>createprocess(nil,'zq010.exe',nil,nil,false,0,nil,nil,info,pinfo)<br>句柄info.hprocess