Page 1 of 1
Posted: Sat May 11, 2002 4:43 pm
by BackupUser
Restored from previous forum. Originally posted by wickedRush.
I've tried repeatedly to change the background color of a gadget using API. Does anyone have a code sample to show how to properly do this?
Posted: Thu May 16, 2002 4:50 pm
by BackupUser
Restored from previous forum. Originally posted by wickedRush.
Anyone ?
Posted: Thu May 16, 2002 6:49 pm
by BackupUser
Restored from previous forum. Originally posted by Bodind.
Hello,
Just a litle help for you:
In your main proc, capture the WM_PAINT message, get a hdc for the handle of
your control and do it like this:
CASE %WM_PAINT
hdc = BeginPaint(hWnd, ps) 'initiates window painting
SetBkColor hdc, CouleurFond ' RGB value
CALL WndPaint(hWnd, hdc)
CALL EndPaint(hWnd, ps) 'ends window painting
FUNCTION = 0
It's from PowerBasic code, but the translation could be easy to do.
Dominique.
Dominique