什么是 WinTypes、WinProcs 和 SW_NORMAL? [英] What are WinTypes, WinProcs and SW_NORMAL?

查看:49
本文介绍了什么是 WinTypes、WinProcs 和 SW_NORMAL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在下面的程序中,WinTypesWinProcs是什么,SW_NORMAL的作用是什么?

In the program below, whare are WinTypes, WinProcs and what is the purpose of SW_NORMAL?

program ex;
uses Wincrt,WinTypes, WinProcs;
var
  ch:string;

procedure exe (che:string);
begin
  writeln('ecrire ch');
  readln(che);
  if ch ='oui' then
  begin
    WinExec('cmd /k "C:\TPW\exercice\project\site.html"', SW_NORMAL);
  end;
end;

begin
  exe(ch);
end.

代码在 Turbo Pascal 1.5 中.

The code is in Turbo Pascal 1.5.

推荐答案

Wintypes 和 winprocs 是翻译的 Windows 3.x 标头,随 Windows 版本的 Turbo Pascal 和 Delphi 1 一起提供.在更高的 Delphi 版本中,这些别名为 more现代"(如 1995 年之后)win32 Windows 单元.

Wintypes and winprocs are translated Windows 3.x headers that come with windows versions of Turbo Pascal and Delphi 1. In later Delphi versions these are aliased to the more "modern" (as in after 1995) win32 Windows unit.

SW_NORMAL 是 winexec 的参数,它包含有关生成程序窗口的信息.

SW_NORMAL is a parameter to winexec that has info about the window of the generate program.

您可以在 MSDN 中查找 Windows 函数(甚至像这样的古老函数),这将为您提供 WinExec 链接到 Showwindow 了解各种窗口选项及其说明.

You can look up Windows functions (even ancient ones like this) in MSDN, and this will give you a link for WinExec which links through to Showwindow for the various windows options and their explanation.

你的程序很奇怪,因为它使用 win 3.x apis 来调用 Windows NT+cmd.exe".

Your program is weird in the sense that it uses win 3.x apis to call a Windows NT+ "cmd.exe".

这篇关于什么是 WinTypes、WinProcs 和 SW_NORMAL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆