vc中这样写为什么会错?我是刚学的

来源:百度知道 编辑:UC知道 时间:2024/05/30 06:19:40
HWND hWnd=::FindWindow(NULL,"Spy++ Lite V2.2");
ShowWindow(hWnd,SW_MIOE);

HWND hWnd=::FindWindow(NULL,"Spy++ Lite V2.2");
ShowWindow(hWnd,SW_HIDE); 主要是你第2个参数写错了

SW_MIOE ? C++里面好像没有吧。

SW_HIDE 表示隐藏窗口
SW_SHOW 表示显示窗口
……

ShowWindow(hWnd,SW_MIOE);
应该是SW_HIDE吧??

ShowWindow(hWnd,SW_MIOE);
WM_MIOE错误,具体参数见MSDN

SW_FORCEMINIMIZE Windows NT 5.0 and later: Minimizes a window, even if the thread that owns the window is hung. This flag should only be used when minimizing windows from a different thread.
SW_HIDE Hides the window and activates another window.
SW_MAXIMIZE Maximizes the specified window.
SW_MINIMIZE Minimizes the specified window and activates the next top-level window in the Z order.
SW_RESTORE Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when restoring a minimized window.
SW_SHOW Activates the window and displays it in i