Bonjour à tous voila je veux déclarer en global des brush pour définir les couleurs de mon texte de mon fond d'appli pour ne pas créer dans chaque méthode createSolideBrush(COLOREF).
J'ai donc déclarer en globale :
COLORREF color_rouge = RGB(255,0,0);
COLORREF color_blanc = RGB(255,255,255);
COLORREF color_bleupastel = RGB(224,224,255);
COLORREF color_vert = RGB(0,255,0);
COLORREF color_bleu = RGB(0,0,255);
COLORREF color_noir = RGB(0,0,0);
COLORREF color_vertpastel = RGB(224,255,224);
COLORREF color_gris = RGB(192,192,192);
HBRUSH CreateSolidBrush(color_rouge);
HBRUSH brush_blanc = CreateSolidBrush(color_blanc);
HBRUSH brush_bleupastel = CreateSolidBrush(color_bleupastel);
HBRUSH brush_vert = CreateSolidBrush(color_vert);
HBRUSH brush_bleu = CreateSolidBrush(color_bleu);
HBRUSH brush_noir = CreateSolidBrush(color_noir);
HBRUSH brush_vertpastel = CreateSolidBrush(color_vertpastel);
HBRUSH brush_gris = CreateSolidBrush(color_gris);
lors de la compilation j'ai une erreur sur les HBRUSH : "initializer element is not constant"
???
Que dois-je faire svp ??