Windows编程基础--窗体篇

所属分类:界面编程
开发工具:Visual C++
文件大小:3KB
下载次数:39
上传日期:2005-11-09 10:26:49
上 传 者cwp
说明:  Windows编程基础--窗体篇   现在Windows已经成为世界上使用最广泛的操作系统,这使得学习Windows编程变得十分重要.和学习其他 编程语言一样,我们也从一个最简单的例子开始学习Windows编程.这个例子将建立一个Windows窗体并在窗体中间显示"HELLO"字符串(见图1).      1.程序的开始和结束 和C语言中的main()函数一样,Windows程序是从WinMain()函数开始和结束的.WinMain()函数是在WINBASE.H中定义的,其原形如下:    int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ) 其中第一个参数(HINSTANCE hInstance)是程序的实例句柄,这个实例句柄是程序的唯一标识.第二个参数(HINSTANCE hPrevInstance)是用做检查是否有多个程序实例运行,但由于Windows9X和NT(包括更高版本)是32位操作系统,所以这个参数总是NULL.第三个参数(LPSTR lpCmdLine)是一个指向字符串的指针,用来保存运行程序时的命令行参数.第四个参数(int nShowCmd)用来指?
(Windows based programming-- Windows Forms chapter now has become the world's most widely used operating system, which makes learning Windows programming has become very important. , And other programming languages, we are also a very simple example start learning Windows programming. This example will establish a WinForms and intermediate forms show "Hello" string (see figure 1). 1. The process begins and ends and the C language main () function, Windows programs from WinMain () function beginning and ending. WinMain () function is defined in WINBASE.H, its prototype is as follows : int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd), the first of which parameters (HINSTANCE hInstance) are examples of procedures handle, the handle)

文件列表:
Windows编程基础--窗体篇.txt (9318, 2005-11-08)

近期下载者

相关文件


收藏者