Bonjour
Alors je suis encor un tt petit debutant...
Je voudrai ajouter de la couleur dans mon texte, voici ce ke j'ai mit :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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;
}
Mon script marche tres bien... Sauf pour les 2 lignes qui définissent la couleur...
Voici ce kil me dit :
undefined reference to `SetTextColor@8'
undefined reference to `SetBkColor@8'
ld returned 1 exit status

Un p'tit coup de pouce serait donc super sympa
++