迅雷影音会员:舟--我想在桌面上显示一些文字,程序错在哪了

来源:百度文库 编辑:高校问答 时间:2024/05/03 02:47:12
#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;
}