我在Visual C 2008中编写Windows应用程序,我想嵌入Windows附带的计算器(calc.exe).有谁知道这是否可能,如果是的话,你能给我一些关于如何实现这一目标的提示吗?
@H_502_2@void EmbedCalc(HWND hWnd) { HWND calcHwnd = FindWindow(L"CalcFrame",NULL); if(calcHwnd != NULL) { // Change the parent so the calc window belongs to our apps main window SetParent(calcHwnd,hWnd); // Update the style so the calc window is embedded in our main window SetWindowLong(calcHwnd,GWL_STYLE,GetWindowLong(calcHwnd,GWL_STYLE) | WS_CHILD); // We need to update the position as well since changing the parent does not // adjust it automatically. SetWindowPos(calcHwnd,NULL,SWP_NOSIZE | SWP_NOZORDER); } }