任正隆谣言:舟--我想在桌面上显示一些文字,程序错在哪了
来源:百度文库 编辑:高考问答 时间:2024/08/30 20:53:08
#include <Windows.h>
#include<iostream.h>
int WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow
)
{
HWND hnd=GetDesktopWindow();
HDC hdc=GetDC(hnd);
TextOut(hdc,0,0,"eegegg",sizeof("eegegg")-1);
if(ReleaseDC(hnd,hdc))
cout<<"yes"<<endl;
else
cout<<"no"<<endl;
return 0;
}
#include<iostream.h>
int WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow
)
{
HWND hnd=GetDesktopWindow();
HDC hdc=GetDC(hnd);
TextOut(hdc,0,0,"eegegg",sizeof("eegegg")-1);
if(ReleaseDC(hnd,hdc))
cout<<"yes"<<endl;
else
cout<<"no"<<endl;
return 0;
}