我的第一个Windows窗体程序

By 深空, 2009年10月20日 22:20

  虽然之前也用JAVA编写过窗体程序,但毕竟不是原装的,这次采用C来写Windows窗体,发现比JAVA简单一些,HOHO

#include <windows.h>
#include <windowsx.h>

int WINAPI WinMain(__in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd) {
    MessageBox(NULL, "Hello world!", "你好世界!", MB_OK | MB_ICONASTERISK);
    return 0;
}

  采用Visual Studio 2008,创建的空项目,直接编译竟然就可以了。

我的第一个Windows窗体程序

我的第一个Windows窗体程序

VN:F [1.9.3_1094]
Rating: 7.1/10 (10 votes cast)
VN:F [1.9.3_1094]
Rating: +4 (from 10 votes)
我的第一个Windows窗体程序, 7.1 out of 10 based on 10 ratings

4 Responses to “我的第一个Windows窗体程序”

  1. 星点 说:

    今天第一个?呵呵

    VA:F [1.9.3_1094]
    Rating: 7.6/10 (5 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 2 votes)
  2. IT柏拉图 说:

    微软让我们变得越来越简单

    VA:F [1.9.3_1094]
    Rating: 5.0/10 (1 vote cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
  3. David 说:

    果然能很轻松的看出来楼主是一直做web开发的,没有接触过Windows程序,VC之类的东西…
    调用一个API就说Windows窗口程序很简单,呵呵…

    VA:F [1.9.3_1094]
    Rating: 10.0/10 (1 vote cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)

Leave a Reply

京ICP备05002071号 ©2003-2010 深空