Q
quaver
Unregistered / Unconfirmed
GUEST, unregistred user!
<br> h:=FindWindow('OpusApp',nil); //OpusApp:Word类名<br> if h<>0 then<br> begin <br> GetWindowText(h,winName,SizeOf(winName));<br> SetForegroundWindow(h);<br> m:=GetMenu(h);//取主菜单句柄,但每次都是0,不知何故<br> m:=GetSubMenu(m,0);//取文件菜单句柄<br> //调'另存为'对话框<br> PostMessage(h,WM_COMMAND,MakeLong(GetMenuItemId(m,4),0),GetSubMenu(m,4));<br>