This thought is very simple, did not think of various functions have tried, the result or not, can only be displayed in the taskbar, but also click on the following taskbar to see the window ...
//CRect C;
//This->getwindowrect (&c);
This->showwindow (Sw_showna);//simple display of the main window the finished child
This->setactivewindow ();
This->setforegroundwindow ();
//this->setwindowpos (This,loword (LParam), HiWord (LParam), C.width (), C.height (), swp_noactivate);
this->bringwindowtotop ();
It's useless up there.
------------------------------------------------------------------------------
This small can not be a small function can not be realized, even if a Microsoft does not open the function ...
-----------------------------------------------------------------------------------
Switchtothiswindow can activate a window of the specified program, which pops the window to the front of the screen. If the window to be activated is in a minimized state, this function will restore the window to the top of the screen. In fact Switchtothiswindow this Windows API function is a so-called non-public API, but although the header file does not have its definition, but there is a description of it in MSDN, so I think it is at most a semi-public API. The Switchtothiswindow is exported in User32.DLL. Function Prototypes:
VOID Switchtothiswindow (HWND hwnd,bool falttab);
parameter Description:
hWnd: The window handle to be activated;
Falttab: Whether to restore the minimized window.
Instructions for use:
You want to restore the minimized window and make it at the top of the screen, as long as you pass true to the Falttab parameter.
Examples of use:
//Because there is no header file, you need to declare the function yourself
typedef void (WINAPI *pswitchtothiswindow) (hwnd,bool);
Pswitchtothiswindow Switchtothiswindow;
hmodule Huser32=getmodulehandle (_t ("user32"));
switchtothiswindow= (Pswitchtothiswindow) GetProcAddress (HUser32, "Switchtothiswindow");
//You can use this function now
Switchtothiswindow (hwindow,true);
Http://zhidao.baidu.com/link?url=_G_3IjsQplx4v1E6lLVx0SxLlwX6DjX7rDfAJRf5LufNB_W2r0yX9eHl7Dy4onXzn0AEp07lv7jBQHr1YpDYhK
Vc/mfc How to display this window and activate it as the current window? Tray Program