#include<stdio.h>
int main(){
printf("班级:2009111\n");
printf("姓名:宋菡\n");
printf("学号:20092358\n");
return 0;
}
②
#include"stdafx.h"
#include<windows.h>
LRESULT CALLBACK MainWndProc(HWND,UINT,WPARAM,LPARAM);
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR ipszCmdLine,int nCmdShow)
{
HWND ghWndMain;
MSG msg;
WNDCLASS wc;
if(!hPrevInstance)
{
wc.style =CS_OWNDC;
wc.lpfnWndProc =(WNDPROC)MainWndProc;
wc.cbClsExtra =0;
wc.cbWndExtra =0;
wc.hInstance =hInstance;
wc.hIcon =LoadIcon(NULL,IDI_APPLICATION);
wc.hCursor =LoadCursor(NULL,IDC_ARROW);
wc.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH);
wc.lpszMenuName =NULL;
wc.lpszClassName="MainWindowClass";
}
if(!RegisterClass(&wc))
{
return(FALSE);
}
ghWndMain=CreateWindow("MainWindowClass","SDK 编程示例",WS_OVERLAPPEDWINDOW,
0,0,600,400,NULL,NULL,hInstance,NULL);
if(ghWndMain==NULL)
{
MessageBox(NULL,"生成窗口不成功!","错误",MB_ICONWARNING);
return(FALSE);
}
ShowWindow(ghWndMain,SW_SHOW);
UpdateWindow(ghWndMain);
while(GetMessage(&msg,NULL,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
LRESULT CALLBACK MainWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
{
HDC hDC;
PAINTSTRUCT ps;
//RECT rect;
switch(message)
{
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_PAINT:
hDC=BeginPaint(hwnd,&ps);
TextOut(hDC,1,1,"同学们好!",9);
EndPaint(hwnd,&ps);
break;
default:
return DefWindowProc(hwnd,message,wParam,lParam);
}
return(FALSE);
}
③
#include"stdafx.h"
#include<windows.h>
LRESULT CALLBACK MainWndProc(HWND,UINT,WPARAM,LPARAM);
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR ipszCmdLine,int nCmdShow)
{
HWND ghWndMain;
MSG msg;
WNDCLASS wc;
if(!hPrevInstance)
{
wc.style =CS_OWNDC;
wc.lpfnWndProc =(WNDPROC)MainWndProc;
wc.cbClsExtra =0;
wc.cbWndExtra =0;
wc.hInstance =hInstance;
wc.hIcon =LoadIcon(NULL,IDI_APPLICATION);
wc.hCursor =LoadCursor(NULL,IDC_HELP);
wc.hbrBackground=(HBRUSH)GetStockObject(GRAY_BRUSH);
wc.lpszMenuName =NULL;
wc.lpszClassName="MainWindowClass";
}
if(!RegisterClass(&wc))
{
return(FALSE);
}
ghWndMain=CreateWindow("MainWindowClass","宋菡 上机实验",WS_OVERLAPPEDWINDOW,
200,100,1000,800,NULL,NULL,hInstance,NULL);
if(ghWndMain==NULL)
{
MessageBox(NULL,"生成窗口不成功!","错误",MB_ICONWARNING);
return(FALSE);
}
ShowWindow(ghWndMain,SW_SHOW);
UpdateWindow(ghWndMain);
while(GetMessage(&msg,NULL,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
LRESULT CALLBACK MainWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
{
HDC hDC;
PAINTSTRUCT ps;
//RECT rect;
switch(message)
{
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_PAINT:
hDC=BeginPaint(hwnd,&ps);
TextOut(hDC,100,100,"学号:20092358,姓名:宋菡",23);
EndPaint(hwnd,&ps);
break;
default:
return DefWindowProc(hwnd,message,wParam,lParam);
}
return(FALSE);
weixin_42653672
- 粉丝: 109
- 资源: 1万+
最新资源
- QT天气预报的布局文件
- 取模软件,可用于OLED屏幕取字模
- CFA知识点梳理系列:CFA Level II, Reading 5 Currency Exchange Rates: Understanding Equilibrium Value
- 在线考试与学习交流-JAVA-基于springBoot语言的在线考试与学习交流网页平台(毕业论文)
- 常规应急物资-JAVA-基于SpringBoot+Vue的常规应急物资管理系统(毕业论文+开题)
- 线上辅导班系统-JAVA-基于springboot的线上辅导班系统的开发与设计(毕业论文)
- 学生信息管理(文档+视频+源码).zip
- 社区管理新篇章:系统设计与技术实现
- VBA视频教程 0003
- 医院资源管理-JAVA-基于springboot的医院资源管理系统设计与实现(毕业论文)
- 图书管管理系统(视频+源码).zip
- 水果检测12-YOLO(v5至v11)、COCO、CreateML、Paligemma数据集合集.rar
- 景区民宿预约系统-JAVA-基于springboot框架开发的景区民宿预约系统的设计与实现(毕业论文)
- Java招聘系统:打造企业人才招聘新工具
- 社区智慧养老监护-JAVA-基于springBoot社区智慧养老监护管理平台设计与实现(毕业论文)
- 美食推荐商城-JAVA-基于springBoot美食推荐商城的设计与实现(毕业论文)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈