如何通过自己的程序让另外的程序窗口总在最后,比如我想用一个程序打开另外一个程序,但同时想使打开的窗口在总在最后,怎么做呀?
解决方案 »
- 求:音乐播放器思路 或代码
- 目前开源的远控代码哪款比较稳定
- 一个sqlite的奇怪问题
- [基础问题]:为什么这么做临界区不行呢?
- 如何实现类似VC界面的三分窗口?
- ADO 怎样判断RecordsetPtr Find方法执行成功
- 如何全屏基于对话框的程序中一个静态控件,然后响应左键返回(50分)
- vc开发的基于odbc的access数据库程序怎么用installshield for vc打包?
- 请问:怎样从一个unsigned char a[2]转换成CString型的,谢谢
- 怎么把mscomm写的串口程序封装成dll文件
- 请问为什么程序在VC中能运行,而编译好的程序不能直接运行
- 开发EMAIL客户端的探讨!!!!!高分相送!!!!!!!!!
你需要得到其它程序的窗口句柄(可以考虑FindWindow)
SetWindowPos Function--------------------------------------------------------------------------------The SetWindowPos function changes the size, position, and Z order of a child, pop-up, or top-level window. Child, pop-up, and top-level windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and is the first window in the Z order.SyntaxBOOL SetWindowPos( HWND hWnd,
HWND hWndInsertAfter,
int X,
int Y,
int cx,
int cy,
UINT uFlags
);
ParametershWnd
[in] Handle to the window.
hWndInsertAfter
[in] Handle to the window to precede the positioned window in the Z order. This parameter must be a window handle or one of the following values.
HWND_BOTTOM
Places the window at the bottom of the Z order. If the hWnd parameter identifies a topmost window, the window loses its topmost status and is placed at the bottom of all other windows.
HWND_NOTOPMOST
Places the window above all non-topmost windows (that is, behind all topmost windows). This flag has no effect if the window is already a non-topmost window.
HWND_TOP
Places the window at the top of the Z order.
HWND_TOPMOST
Places the window above all non-topmost windows. The window maintains its topmost position even when it is deactivated.
For more information about how this parameter is used, see the following Res section.