1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| case WM_CREATE : /** OK **/
{
hEdit = CreateWindow("EDIT", "Texte",
WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE | ES_WANTRETURN,
0, 0, 0, 0, notePadWnd, NULL, hInstance, NULL);
/* fond noir par defaut */
hEditColor = CreateSolidBrush(RGB(0,0,0));
return 0;
}
case WM_CTLCOLOREDIT :
{
/* couleur du fond */
hdc = (HDC)wParam;
SetTextColor(hdc, RGB(0,255,0)); /* couleur du texte */
SetBkColor(hdc, RGB(colors[0], colors[1], colors[2])); /* couleur du fond derriere le texte !! */
return (LONG)hEditColor;
} |
Partager