WndClass.style = 3
WndClass.lpfnwndproc = &WndProc ' 发生调用
WndClass.cbClsextra = 0
WndClass.cbWndExtra = 0
WndClass.hInstance = hInstance
WndClass.hIcon = LoadIcon (0, “32512”)
WndClass.hCursor = LoadCursor (0, “32512”)
WndClass.hbrBackground = GetStockObject (0)
WndClass.lpszMenuName = “”
WndClass.lpszClassName = #AppName ' 以上为初始化窗口类
.如果真 (RegisterClass (WndClass) = 0) ' 窗口类注册
信息框 (“This program requires Windows NT!”, 16, #AppName) ' 如果注册失败弹出提示
返回 (0)
.如果真结束
hWnd = CreateWindow (0, #AppName, “The Hello Program”, 13565952, 2147483648, 2147483648, 2147483648, 2147483648, 0, 0, hInstance, “”) ' 创建窗口
ShowWindow (hWnd, nCmdShow) ' 显示窗口
UpdateWindow (hWnd) ' 绘制用户区
.判断循环首 (GetMessage (Msg, 0, 0, 0) ≠ 0) ' 消息循环
TranslateMessage (Msg)
DispatchMessage (Msg)
.判断循环尾 ()
返回 (Msg.wParam) ' 消息循环结束即程序终止时将信息返回系统
上一篇 EDB数据库字段编辑器