消息框: using System.Runtime.InteropServices; namespace Windows_API_实现屏幕右下角_消息框_ { public partial class Msg : Form { public Msg() { InitializeComponent(); Point p = , Screen.PrimaryScreen.WorkingArea.Height - ); this.PointToScreen(p); this.Location = p;
在VC SDK的WinDef.h中,宏WINAPI被定义为__stdcall,这是C语言中一种调用约定,常用的还有__cdecl和__fastcall.这些调用约定会对我们的代码产生什么样的影响?让我们逐个分析. 首先,在x86平台上,用VC编译这样一段代码: int __cdecl TestC(int n0, int n1, int n2, int n3, int n4, int n5) { int n = n0 + n1 + n2 + n3 + n4 + n5; return n; } in