文件名: WinHelloWorld.c

代码:

#include <windows.h>

#include <tchar.h>

#pragma comment(lib,"user32.lib")

 

int WINAPI WinMain(HINSTANCE hInstance,

HINSTANCE hPrevInstance,

 PSTR szCmdLine, int iCmdShow) {

                MessageBox(NULL, _T("Hello, Windows 2003!"), _T("Hello Msg"), MB_OK);

                return 0;

}

编译命令: cl /EHsc WinHelloWorld.c

说明:_T为定义在tchar.h里的宏.

一个相当不错的win32入门教程,使用c语言讲解.

http://www.winprog.org/tutorial/

相关文章:

  • 2022-01-12
  • 2021-12-05
  • 2021-08-31
  • 2022-01-31
  • 2022-12-23
  • 2021-08-09
  • 2022-02-12
  • 2021-12-06
猜你喜欢
  • 2021-10-21
  • 2021-12-05
  • 2021-12-05
  • 2022-03-03
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案