图像处理,多个opencv小程序,怎么集成到一个windows窗体应用程序中,使用button按钮执行多个程序

图像处理,多个opencv小程序,如何集成到一个windows窗体应用程序中,使用button按钮执行多个程序
本帖最后由 u012797295 于 2014-12-11 21:58:12 编辑
如题
图像处理,多个opencv小程序,如何集成到一个windows窗体应用程序中,使用button按钮执行多个程序
------解决思路----------------------
自己创建MFC窗口,openCV有一个废弃的了的函数,可以把帧通过DC绘制到窗体上,这个我以前弄过,代码找不到了,网上有废弃函数的源码,拿过来直接用,还有一些其他例子:
http://blog.sciencenet.cn/blog-297739-253532.html
http://blog.csdn.net/ycc892009/article/details/6516541

------解决思路----------------------
http://blog.csdn.net/liups/article/details/32147833
------解决思路----------------------
把它们写成一个子程序,要不在按钮点击的事件里加操作啊
------解决思路----------------------
简单的办法就是点击按钮,响应事件,弹出opencv 的窗口执行结果
------解决思路----------------------
WinExec
The WinExec function runs the specified application. 

This function is provided for compatibility with 16-bit Windows. Win32-based applications should use the CreateProcess function. 

UINT WinExec(
  LPCSTR lpCmdLine,  // address of command line
  UINT uCmdShow      // window style for new application
);
 
Parameters
lpCmdLine 
Pointer to a null-terminated character string that contains the command line (filename plus optional parameters) for the application to be executed. If the name of the executable file in the lpCmdLine parameter does not contain a directory path, the system searches for the executable file in this sequence: 
The directory from which the application loaded. 
The current directory. 
The Windows system directory. TheGetSystemDirectory function retrieves the path of this directory. 
The Windows directory. TheGetWindowsDirectory function retrieves the path of this directory. 
The directories listed in the PATH environment variable. 
uCmdShow 
Specifies how a Windows-based application window is to be shown and is used to supply the wShowWindow member of the STARTUPINFO parameter to the CreateProcess function. For a list of the acceptable values, see the description of the nCmdShow parameter of theShowWindow function. For a non-Windows – based application, the PIF file, if any, for the application determines the window state. 
Return Values
If the function succeeds, the return value is greater than 31.

If the function fails, the return value is one of the following error values: 

Value Meaning 
0 The system is out of memory or resources. 
ERROR_BAD_FORMAT The .EXE file is invalid (non-Win32 .EXE or error in .EXE image). 
ERROR_FILE_NOT_FOUND The specified file was not found. 
ERROR_PATH_NOT_FOUND The specified path was not found. 


Remarks
In Win32, the WinExec function returns when the started process calls the GetMessage function or a time-out limit is reached. To avoid waiting for the time out delay, call the GetMessage function as soon as possible in any process started by a call to WinExec. 

See Also
Processes and Threads Overview, Process and Thread Functions, CreateProcess,GetMessage,GetSystemDirectory,GetWindowsDirectory, LoadModule,ShowWindow