源码

 1 #include<Windows.h>
 2 #include<stdio.h>
 3 
 4 int MessageBoxPrint(char *szFormat, ...);
 5 
 6 int WinMain(HINSTANCE hInst, HINSTANCE tmp, LPSTR strCmd, int nShow)
 7 {
 8     char str[1024];
 9     MessageBoxPrint("%p", hInst);
10     return 0;
11 }
12 
13 int MessageBoxPrint(char *szFormat, ...)
14 {
15     char buf[1024];
16     va_list va;
17     va_start(va, szFormat);
18     vsnprintf(buf, sizeof(buf), szFormat, va);
19     va_end(va);
20     return MessageBox(NULL,buf,"printf",MB_OK);
21 }
View Code

相关文章:

  • 2021-12-11
  • 2022-12-23
  • 2021-05-23
  • 2021-11-23
  • 2021-04-24
  • 2021-04-29
  • 2021-10-01
猜你喜欢
  • 2021-07-04
  • 2022-01-05
  • 2021-10-11
  • 2022-12-23
  • 2021-10-25
  • 2022-02-26
  • 2022-12-23
相关资源
相似解决方案