110,534
社区成员
发帖
与我相关
我的任务
分享
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace WindowsFormsApplication2
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
//创建关于Form1实例的消息循环
Application.Run(new Form1());//->这里就会进入一个循环,你想了解最好看看c++ sdk编程
/*
// 这里是c++中自己处理消息而建立的消息循环,这个循环一般也就是整个软件的“发动机”
// 什么是消息,请参考google,baidu 搜索 windows message
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))//GetMessage每次从系统的消息队列取一个消息
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))//vc中处理快捷键的方法
{
TranslateMessage(&msg);//解析消息
DispatchMessage(&msg);//分发处理消息,这里会调用WndProc
}
}
*/
}
}
}