1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| #include <windows.h>
#define EXPORT __declspec (dllexport)
RECT SetDRect(short x, short y, short size){
RECT retRect = {x,y,x+size,y+size};
return retRect;
}
EXPORT int APIENTRY_WinMain(double n1, double n2, char* txt)
{
HDC DeskTopDC = GetDC(HWND_DESKTOP);
RECT drawRect;
SetTextColor(DeskTopDC,RGB(255,0,0));
SetBkColor(DeskTopDC,RGB(0,255,0));
drawRect = SetDRect(n1,n2,strlen(txt)*10);
DrawText(DeskTopDC,txt,strlen(txt),&drawRect,DT_SINGLELINE || DT_TOP);
return 0;
} |
Partager